WWW::Crawler::Mojo::Job - Single crawler job
my $job = WWW::Crawler::Mojo::Job->new;
This class represents a single crawler job.
A Mojo::URL instance of the literal URL that has appeared in the referrer document.
A Mojo::URL instance of the resolved URL.
A job instance that has referred the URL.
An array reference that contains URLs of redirect history.
HTTP request method such as get or post.
A hash reference that contains params for Mojo::Transaction.
Clones the job.
Initiate a child job by parent job. The parent uri is set to child referrer.
my $job1 = WWW::Crawler::Mojo::Job->new(resolved_uri => 'http://a/1'); my $job2 = $job1->child(resolved_uri => 'http://a/2'); say $job2->referrer # 'http://a/1'
Counts the depth of job in referrer series.
Replaces the resolved URI and history at once.
my $job = WWW::Crawler::Mojo::Job->new; $job->resolved_uri($url1); $job->redirect($url2, $url3); say $job->resolved_uri # $url2 say $job->redirect_history # [$url1, $url3]
Returns the original URI of redirected job.
Sugama Keita, <sugama@jamadam.com>
Copyright (C) Sugama Keita.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install WWW::Crawler::Mojo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Crawler::Mojo
CPAN shell
perl -MCPAN -e shell install WWW::Crawler::Mojo
For more information on module installation, please visit the detailed CPAN module installation guide.