www-mechanize-plugin-sleepy
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:
=pod

=encoding utf-8

=head1 NAME

WWW::Mechanize::Plugin::Sleepy - A WWW::Mechanize plugin to provide the behaviour of WWW::Mechanize::Sleepy while using WWW::Mechanize::Pluggable

=head1 VERSION

version 0.003

=head1 SYNOPSIS

Set all Mechanize objects to sleep for 5 seconds between requests:

    use WWW::Mechanize::Pluggable Sleepy => [ sleep => 5 ];

or, set single Mechanize instance to sleep for 5 seconds between requests:

    use WWW::Mechanize::Pluggable;
    
    my $mech = WWW::Mechanize::Pluggable->new( sleep => 5 );

To change sleep time:

    $mech->sleep(2);    # now sleep for 2 seconds per request

To sleep for a random number of seconds, specify the range as a string in the
following format:

    'i1..i2'
    
    # e.g. will sleep between 5 and 10 seconds, inclusive
    $mech->sleep('5..10');

=head1 DESCRIPTION

This module makes it easy to slow down L when using
L, in the manner of L.

The code merely adds hooks containing a C before several
WWW::Mechanize methods, but is possibly preferable to scattering Cs
throughout code in order to slow down tests, for example.

=head1 METHODS

=head2 sleep

    $mech->sleep(1);
    $mech->sleep('5..10');
    
    my $sleep = $mech->sleep;

Get/set sleep time

=head1 ACKNOWLEDGEMENTS

Code and tests based on L

=head1 SEE ALSO

=over 4

=item *

L

=item *

L

=back

=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan

=head1 SUPPORT

=head2 Bugs / Feature Requests

Please report any bugs or feature requests through the issue tracker
at L.
You will be notified automatically of any progress on your issue.

=head2 Source Code

This is open source software.  The code repository is available for
public review and contribution under the terms of the license.

L

  git clone git://github.com/mjemmeson/www-mechanize-plugin-sleepy.git

=head1 AUTHOR

Michael Jemmeson 

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Foxtons Ltd.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.


本源码包内暂不包含可直接显示的源代码文件,请下载源码包。