view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
When altering your databases with timeouts it is wise to use
transactions. If you quit due to timeout while performing insert, update
or schema-altering commands you can end up not knowing if the action was
submitted to the database, complicating recovery.
Timeout errors are always fatal.
=back
Any additional key-value pairs will be rolled into a hash reference
and passed as the final argument to the C<< DBI->connect (...) >>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/DNS/Nameserver.pm view on Meta::CPAN
$self->{LocalAddr} = $p{LocalAddr} || '0.0.0.0';
$self->{LocalPort} = $p{LocalPort} || 53;
$self->{ReplyHandler} = $p{ReplyHandler} or die "ReplyHandler invalid\n";
$self->{Verbose} = $p{Verbose} || 0;
$self->{Truncate} = $p{Truncate} || 1;
$self->{IdleTimeout} = $p{IdleTimeout} || 120;
$self->{NotifyHandler} = $p{NotifyHandler};
$self->{watchers} = [];
my @LocalAddr =ref $self->{LocalAddr} eq 'ARRAY'?@{$self->{LocalAddr}}:($self->{LocalAddr});
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/FTP/Client.pm view on Meta::CPAN
=head1 ATTRIBUTES
=head2 timeout
Timeout for the initial connection to the FTP server. The default
is 30.
=head2 passive
If set to true (the default) then data will be transferred using the
view all matches for this distribution
view release on metacpan or search on metacpan
0.05 Oct 5, 2017
- Fix tests, "close undef" seems to be a fatal error on
Windows (but report by Alexandr Ciornii).
0.04 Oct 5, 2017
- Timeout handling was broken (bug report and patch by Manfred
Stock).
- Passing a file handle instead of a file name was broken (bug
report and patch by Manfred Stock).
- Several minor documentation corrections.
view all matches for this distribution
view release on metacpan or search on metacpan
my $timeout; $timeout =
AE::timer 2, 0 => sub { undef $obj; undef $timeout; $cv->send };
$cv->recv;
ok $timeout, "Timeout wasn't reached";
}
{
my $cv = condvar AnyEvent;
my $obj = new AnyEvent::ForkObject;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Future.pm view on Meta::CPAN
Returns a new leaf future instance that will become ready at the time given by
the arguments, which will be passed to the C<< AnyEvent->timer >> method.
C<new_delay> returns a future that will complete successfully at the alotted
time, whereas C<new_timeout> returns a future that will fail with the message
C<Timeout>. This is provided as a simple utility for small use-cases; for a
more find-grained control over the failure message and additional values you
may wish to use C<new_delay> combined with the C<then_fail> method:
new_delay( after => 10 )
->then_fail( "The operation timed out after 10 seconds", timeout => );
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
$loop->end;
};
$loop->begin;
http_get "http://$h_host:$h_port/", timeout => 3, socks => "socks4://$s4_host:$s4_port", sub {
is($_[1]->{Status}, 595, 'Timeout');
$loop->end;
};
$loop->begin;
http_get "http://$h_host:$h_port/", socks => "socks5://$s3_host:$s3_port -> socks4://$s1_host:$s1_port", sub {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
samples/anyeventirc view on Meta::CPAN
});
# Disconnect after 10 seconds:
my $t;
$t = AnyEvent->timer (after => 10, cb => sub {
$con->disconnect ("Timeout exceeded");
undef $t;
});
# lets register connect and disconnect handlers.
$con->reg_cb (
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
t/100_active/101_session.t view on Meta::CPAN
use_ok 'AnyEvent::MSN';
#{package AnyEvent::MSN; $DEBUG=$DEBUG=1;}
my $cv = AnyEvent->condvar;
my $to
= AnyEvent->timer(after => 60, cb => sub { diag 'Timeout!'; $cv->send });
my $msn = AnyEvent::MSN->new(
passport => 'anyevent_msn@hotmail.com',
password => 'public',
on_connect => sub {
my $s = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
if (eval { require LWP::Simple; 1 }) {
LWP::Simple::mirror($args{url}, $file);
}
elsif (eval { require Net::FTP; 1 }) { eval {
# use Net::FTP to get past firewall
my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
$ftp->login("anonymous", 'anonymous@example.com');
$ftp->cwd($path);
$ftp->binary;
$ftp->get($file) or (warn("$!\n"), return);
$ftp->quit;
view all matches for this distribution