WWW::Webrobot::MyUserAgent - specialized user agent
my $ua = WWW::Webrobot::MyUserAgent -> new
This class inherits LWP::UserAgent. Additional features:
Create user agent.
Set a realm for basic authentification
$realm = { "realm1" => ["login1", "password1"], "realm2" => ["login2", "password2"], };
inherited from LWP::UserAgent
Set an object that allows recursion over the resulting responses. For $recurse see WWW::Webrobot::pod::Recur. Affects redirect_ok.
$recurse
Clear the redirect_fail flag. This flag may be set in redirect_ok.
Get the value of the redirect_fail flag. This flag indicates that a redirection was aborted.
$ua->client_302_bug(1) Behave like 302-buggy browser, no method to unset available. $ua->client_302_bug return whether value is set
Most popular browsers don't implemenent HTTP response 302 correctly, see [RFC 2616] http://www.ietf.org/rfc/rfc2616.txt page 61, section 10.3.3, title "302 Found". In short:
- bug 1: browser redirects POST without user interaction - bug 2: browser changes method from POST to GET
You should better correct your server instead of using this method: return 303 instead of 302.
Enable (1) or disable the HTTP referrer (which spells 'Referer')
Set/get the referrer value if referrers have been enabled by enable_referrer.
To install WWW::Webrobot, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Webrobot
CPAN shell
perl -MCPAN -e shell install WWW::Webrobot
For more information on module installation, please visit the detailed CPAN module installation guide.