NAME

WWW::Mechanize::Sleepy - A Sleepy Mechanize Agent

SYNOPSIS

 use WWW::Mechanize::Sleepy;

 # sleep 5 seconds between requests
 my $a = WWW::Mechanize::Sleepy->new( sleep => 5 );
 $a->get( 'http://www.ctw.org' );

 # sleep between 5 and 20 seconds between requests
 my $a = WWW::Mechanize::Sleepy->new( sleep => '5..20' );
 $a->get( 'http://www.ctw.org' );

DESCRIPTION

Sometimes when testing the behavior of a webserver it is important to be able to space out your requests in order to simulate a person reading, thinking (or sleeping) at the keyboard.

WWW::Mechanize::Sleepy subclasses WWW::Mechanize to provide pauses between your server requests. Use it just like you would use WWW::Mechanize.

METHODS

All the methods are the same as WWW::Mechanize, except for the constructor which accepts a few additional parameters.

new()

The constructor which acts just like the WWW::Mechanize constructor except you can pass it some extra parameters.

  • sleep

    An amount of time in seconds to sleep.

    my $a = WWW::Mechanize::Sleepy->new( sleep => 5 );

    Or a range of time to sleep to sleep within. Your robot will sleep a random amount of time within that range.

    my $a = WWW::Mechanize::Sleepy->new( sleep => '5..20' );

AUTHORS

  • Ed Summers <ehs@pobox.com>

SEE ALSO

LICENSE

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

1 POD Error

The following errors were encountered while parsing the POD:

Around line 59:

You forgot a '=back' before '=head1'