view release on metacpan or search on metacpan
789101112131415161718192021222324252627
version 0.049
SYNOPSIS
#!/usr/bin/env perl
extends
'https://metacpan.org/pod/AnyEvent::Net::Curl::Queued::Easy">AnyEvent::Net::Curl::Queued::Easy'
;
after
finish
=>
sub
{
my
(
$self
,
$result
) =
@_
;
123456789101112131415#!/usr/bin/env perl
# ABSTRACT: Yet Another Download Accelerator CLI wrapper
# PODNAME: yada
use
strict;
use
utf8;
use
Config;
use
Fcntl;
use
File::Copy;
use
Getopt::Long;
use
IO::Handle;
use
Pod::Usage;
use
URI;
eg/CrawlApache.pm view on Meta::CPAN
12345678910111213
eg/Gauge/AnyEvent_Curl_Multi.pm view on Meta::CPAN
123456789101112package
Gauge::AnyEvent_Curl_Multi;
use
strict;
use
utf8;
use
Any::Moose;
use
AnyEvent;
use
WWW::Curl::Easy;
eg/Gauge/Furl.pm view on Meta::CPAN
123456789101112
eg/Gauge/HTTP_Lite.pm view on Meta::CPAN
123456789101112package
Gauge::HTTP_Lite;
use
strict;
use
utf8;
use
Any::Moose;
use
HTTP::Lite;
sub
run {
my
(
$self
) =
@_
;
eg/Gauge/HTTP_Tiny.pm view on Meta::CPAN
123456789101112package
Gauge::HTTP_Tiny;
use
strict;
use
utf8;
use
Any::Moose;
use
HTTP::Tiny;
sub
run {
my
(
$self
) =
@_
;
eg/Gauge/LWP_Curl.pm view on Meta::CPAN
123456789101112package
Gauge::LWP_Curl;
use
strict;
use
utf8;
use
Any::Moose;
use
LWP::Curl;
sub
run {
my
(
$self
) =
@_
;
eg/Gauge/LWP_Protocol_Net_Curl.pm view on Meta::CPAN
12345678910111213package
Gauge::LWP_Protocol_Net_Curl;
use
strict;
use
utf8;
use
Any::Moose;
use
LWP::UserAgent;
sub
run {
my
(
$self
) =
@_
;
eg/Gauge/LWP_UserAgent.pm view on Meta::CPAN
123456789101112package
Gauge::LWP_UserAgent;
use
strict;
use
utf8;
use
Any::Moose;
use
LWP::UserAgent;
sub
run {
my
(
$self
) =
@_
;
eg/Gauge/Mojo_UserAgent.pm view on Meta::CPAN
123456789101112package
Gauge::Mojo_UserAgent;
use
strict;
use
utf8;
use
Any::Moose;
use
Mojolicious;
my
$loop
;
BEGIN {
$loop
= Mojo::IOLoop->singleton }
eg/Gauge/Parallel_Downloader.pm view on Meta::CPAN
12345678910111213package
Gauge::Parallel_Downloader;
use
strict;
use
utf8;
use
Any::Moose;
use
Parallel::Downloader;
sub
run {
my
(
$self
) =
@_
;
eg/Gauge/Role.pm view on Meta::CPAN
123456789101112131415package
Gauge::Role;
use
autodie;
use
strict;
use
utf8;
use
File::Temp;
requires
qw(run)
;
has
fork_manager
=> (
is
=>
'ro'
,
eg/Gauge/WWW_Mechanize.pm view on Meta::CPAN
123456789101112package
Gauge::WWW_Mechanize;
use
strict;
use
utf8;
use
Any::Moose;
use
WWW::Mechanize;
sub
run {
my
(
$self
) =
@_
;
eg/Gauge/YADA.pm view on Meta::CPAN
123456789101112
eg/Gauge/curl.pm view on Meta::CPAN
12345678910111213package
Gauge::curl;
use
strict;
use
utf8;
use
Any::Moose;
sub
run {
my
(
$self
) =
@_
;
my
$curl_queue
;
$self
->run_forked(
sub
{
eg/Gauge/lftp.pm view on Meta::CPAN
12345678910111213package
Gauge::lftp;
use
strict;
use
utf8;
use
Any::Moose;
sub
run {
my
(
$self
) =
@_
;
my
$lftp_queue
= File::Temp->new;
say
$lftp_queue
"set cmd:queue-parallel "
.
$self
->parallel;
eg/Gauge/wget.pm view on Meta::CPAN
12345678910111213package
Gauge::wget;
use
strict;
use
utf8;
use
Any::Moose;
sub
run {
my
(
$self
) =
@_
;
my
$wget_queue
;
$self
->run_forked(
sub
{
eg/benchmark.pl view on Meta::CPAN
123456789101112
eg/crawl-apache.pl view on Meta::CPAN
12345678910111213#!/usr/bin/env perl
use
strict;
use
utf8;
use
Data::Printer;
use
YADA;
use
CrawlApache;
my
$q
= YADA->new;
$q
->append(
sub
{
eg/fetch-urls.pl view on Meta::CPAN
1234567891011121314151617#!/usr/bin/env perl
## no critic (ProhibitMultiplePackages)
package
MyDownloader;
use
strict;
use
utf8;
use
Moo;
has
'+use_stats'
=> (
default
=>
sub
{ 1 });
has
'+retry'
=> (
default
=>
sub
{ 10 });
after
init
=>
sub
{
eg/fetch-urls.pl view on Meta::CPAN
eg/simple.pl view on Meta::CPAN
eg/yada-crawler.pl view on Meta::CPAN
1234567891011121314#!/usr/bin/env perl
use
5.016;
use
common::sense;
use
utf8::all;
use
Web::Scraper::LibXML;
use
YADA;
YADA->new(
common_opts
=> {
encoding
=>
''
},
http_response
=> 1,
max
=> 4)
my
(
$self
) =
@_
;
return
if
not
$self
->response->is_success
or not
$self
->response->content_is_html;
my
$doc
= scraper {
inc/Test/HTTP/AnyEvent/Server.pm view on Meta::CPAN
1234567891011121314151617package
Test::HTTP::AnyEvent::Server;
# ABSTRACT: the async counterpart to Test::HTTP::Server
use
strict;
use
utf8;
use
AnyEvent;
use
AnyEvent::Handle;
use
AnyEvent::Log;
use
AnyEvent::Socket;
use
AnyEvent::Util;
use
HTTP::Headers;
use
HTTP::Request;
use
HTTP::Response;
inc/Test/HTTP/AnyEvent/Server.pm view on Meta::CPAN
278279280281282283284285286287288289290291292293294295296297298
return
;
}
1;
__END__
=pod
=encoding utf8
=head1 NAME
Test::HTTP::AnyEvent::Server - the async counterpart to Test::HTTP::Server
=head1 VERSION
version 0.007
=head1 SYNOPSIS
lib/AnyEvent/Net/Curl/Const.pm view on Meta::CPAN
12345678910111213141516package
AnyEvent::Net::Curl::Const;
# ABSTRACT: Access Net::Curl::* constants by name
use
strict;
use
utf8;
use
Net::Curl::Easy;
our
$VERSION
=
'0.049'
;
# VERSION
my
(
%const_info
,
%const_opt
);
lib/AnyEvent/Net/Curl/Queued.pm view on Meta::CPAN
12345678910111213141516package
AnyEvent::Net::Curl::Queued;
# ABSTRACT: Moo wrapper for queued downloads via Net::Curl & AnyEvent
use
strict;
use
utf8;
use
AnyEvent;
use
Moo;
use
MooX::Types::MooseLike::Base qw(
AnyOf
ArrayRef
Bool
HashRef
lib/AnyEvent/Net/Curl/Queued.pm view on Meta::CPAN
249250251252253254255256257258259260261262263264265266267268version 0.049
=head1 SYNOPSIS
#!/usr/bin/env perl
package CrawlApache;
use feature qw(say);
use strict;
use utf8;
use warnings qw(all);
use HTML::LinkExtor;
use Moo;
extends 'AnyEvent::Net::Curl::Queued::Easy';
after finish => sub {
my ($self, $result) = @_;
lib/AnyEvent/Net/Curl/Queued.pm view on Meta::CPAN
lib/AnyEvent/Net/Curl/Queued/Easy.pm view on Meta::CPAN
1234567891011121314151617package
AnyEvent::Net::Curl::Queued::Easy;
# ABSTRACT: Net::Curl::Easy wrapped by Moo
use
strict;
use
utf8;
use
Digest::SHA;
use
Encode;
use
HTTP::Response;
use
JSON;
use
Moo;
use
MooX::Types::MooseLike::Base qw(
AnyOf
lib/AnyEvent/Net/Curl/Queued/Easy.pm view on Meta::CPAN
37383940414243444546474849505152535455no
if
($] >= 5.017010),
warnings
=>
q(experimental)
;
our
$VERSION
=
'0.049'
;
# VERSION
has
json
=> (
is
=>
'ro'
,
isa
=> InstanceOf[
'JSON'
],
default
=>
sub
{ JSON->new->utf8->allow_blessed->convert_blessed },
lazy
=> 1,
);
has
curl_result
=> (
is
=>
'ro'
,
isa
=> Object,
writer
=>
'set_curl_result'
);
has
data
=> (
is
=>
'ro'
,
isa
=> ScalarRef,
writer
=>
'set_data'
);
lib/AnyEvent/Net/Curl/Queued/Easy.pm view on Meta::CPAN
144145146147148149150151152153154155156157158159160161162163164
# return the signature
return
$digest
;
}
sub
sign {
my
(
$self
,
$str
) =
@_
;
# add entropy to the signature
## no critic (ProtectPrivateSubs)
Encode::_utf8_off(
$str
);
return
$self
->sha->add(
$str
);
}
sub
init {
my
(
$self
) =
@_
;
# buffers
my
$data
=
''
;
$self
->set_data(\
$data
);
lib/AnyEvent/Net/Curl/Queued/Easy.pm view on Meta::CPAN
337338339340341342343344345346347348349350351352353354355356357358sub
_setopt_postfields {
my
(
$self
,
$val
) =
@_
;
my
$is_json
= 0;
if
(
'HASH'
eq
ref
$val
) {
++
$is_json
;
$val
=
$self
->json->encode(
$val
);
}
else
{
# some DWIMmery here!
# application/x-www-form-urlencoded is supposed to have a 7-bit encoding
$val
= encode_utf8(
$val
)
if
utf8::is_utf8(
$val
);
my
$obj
;
++
$is_json
if
'HASH'
eq
ref
(
$obj
=
eval
{
$self
->json->decode(
$val
) });
}
return
(
$self
->set_post_content(
$val
),
$is_json
);
}
sub
_setopt_encoding {
my
(
$self
,
$val
) =
@_
;
lib/AnyEvent/Net/Curl/Queued/Easy.pm view on Meta::CPAN
420421422423424425426427428429430431432433434435436437438439AnyEvent::Net::Curl::Queued::Easy - Net::Curl::Easy wrapped by Moo
=head1 VERSION
version 0.049
=head1 SYNOPSIS
package MyIEDownloader;
use strict;
use utf8;
use warnings qw(all);
use Moo;
use Net::Curl::Easy qw(/^CURLOPT_/);
extends 'AnyEvent::Net::Curl::Queued::Easy';
after init => sub {
my ($self) = @_;
lib/AnyEvent/Net/Curl/Queued/Multi.pm view on Meta::CPAN
12345678910111213141516package
AnyEvent::Net::Curl::Queued::Multi;
# ABSTRACT: Net::Curl::Multi wrapped by Moo
use
strict;
use
utf8;
use
AnyEvent;
use
Moo;
use
MooX::Types::MooseLike::Base qw(
AnyOf
ArrayRef
HashRef
Int
lib/AnyEvent/Net/Curl/Queued/Stats.pm view on Meta::CPAN
12345678910111213141516package
AnyEvent::Net::Curl::Queued::Stats;
# ABSTRACT: Connection statistics for AnyEvent::Net::Curl::Queued::Easy
use
strict;
use
utf8;
use
AnyEvent;
use
Moo;
our
$VERSION
=
'0.049'
;
# VERSION
lib/YADA.pm view on Meta::CPAN