NAME
WWW::Crawler::Mojo::Queue - Single crawler queue
SYNOPSIS
my $ua = WWW::Crawler::Mojo::Queue->new;
DESCRIPTION
This class represents a single crawler queue.
ATTRIBUTES
literal_uri
resolved_uri
referrer
depth
additional_props
Add propeties for queue.
$queue->additional_props({key1 => $value1, key2 => $value2});
redirect_history
METHODS
child
Initiate a child queue by parent queue. The parent uri is set to child referrer.
my $queue1 = WWW::Crawler::Mojo::Queue->new(resolved_uri => 'http://a/1');
my $queue2 = $queue1->child(resolved_uri => 'http://a/2');
say $queue2->referrer # 'http://a/1'
add_props
redirect
Replaces the resolved URI and history at once.
my $queue = WWW::Crawler::Mojo::Queue->new;
$queue->resolved_uri($url1);
$queue->redirect($url2, $url3);
say $queue->resolved_uri # $url2
say $queue->redirect_history # [$url1, $url3]
AUTHOR
Sugama Keita, <sugama@jamadam.com>
COPYRIGHT AND LICENSE
Copyright (C) Sugama Keita.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.