view release on metacpan or search on metacpan
t/useragent.t view on Meta::CPAN
$ua->connect_timeout(1);
my $search = Astro::ADS::Search->new( q => 'dark energy', sort => 'citation_count desc', rows => 100, ua => $ua);
$search->fl('ack,aff,aff_id,alternate_bibcode,alternate_title,arxiv_class,author,author_count,author_norm,bibcode,bibgroup,bibstem,citation,citation_count,cite_read_boost,classic_factor,comment,copyright,data,database,date,doctype,doi,eid,ent...
my $result = $search->query();
$DB::single = 1;
like $result->error, qr/Timeout/;
};
=cut
done_testing();
view all matches for this distribution
view release on metacpan or search on metacpan
# grab the argument list
my %args = @_;
# Loop over the allowed keys and modify the default query options
for my $key (qw / RA Dec Target Equinox Xsize Ysize Survey Format
URL Timeout Proxy / ) {
my $method = lc($key);
$self->$method( $args{$key} ) if exists $args{$key};
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
=over 4
=item *
B<Timeout handling>
By default a script will die upon timeout, this can be modified in anyway you like to keep the script going and handle the exception cleanly, an example of a handler is:
my $timed_out = 0;
$iraf->exec(command => 'print "hello"',
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
Query/Query.pm view on Meta::CPAN
Units => $radius_units,
Frame => $coord_frame,
Epoch => $coord_epoch,
Equinox => $coord_equinox,
Proxy => $proxy,
Timeout => $timeout,
URL => $alternative_url );
my $results = $query->querydb();
$other = new Astro::SIMBAD::Query( Target => $object );
Query/Query.pm view on Meta::CPAN
Units => $radius_units,
Frame => $coord_frame,
Epoch => $coord_epoch,
Equinox => $coord_equinox,
Proxy => $proxy,
Timeout => $timeout,
URL => $alternative_url );
returns a reference to an SIMBAD query object.
=cut
Query/Query.pm view on Meta::CPAN
# Loop over the allowed keys and modify the default query options, note
# that due to the order these are called in supplying both and RA and Dec
# and an object Identifier (e.g. HT Cas) will cause the query to default
# to using the identifier rather than the supplied co-ordinates.
for my $key (qw / RA Dec Target Error Units Frame Epoch Equinox
Proxy Timeout URL / ) {
my $method = lc($key);
$self->$method( $args{$key} ) if exists $args{$key};
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/SkyX.pm view on Meta::CPAN
PeerAddr => $destinationIP,
PeerPort => $destinationPort,
Blocking => 0,
autoflush => 1,
Proto => 'tcp',
Timeout => "300",
);
if ( ! Scalar::Util::openhandle($SkyXConnection ) ){
die "Unable to connect to The Sky X\n";
}
$SkyXConnection->autoflush(1);
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
$('#comet_sequence').text(data[0]);
$('#comet_resource').text(data[1]);
sendCometRequest();
})
.fail(function() {
setTimeout(sendCometRequest, RECONNECT_BACKOFF);
});
};
sendCometRequest();
// Setup WebSocket
var data = event.data.split(" ");
$('#websocket_sequence').text(data[0]);
$('#websocket_resource').text(data[1]);
};
ws.onclose = function() {
setTimeout(connectWebsocket, RECONNECT_BACKOFF);
};
};
connectWebsocket();
});
//--></script>
view all matches for this distribution
view release on metacpan or search on metacpan
local ( $., $@, $!, $^E, $? );
kill 9, $pid; # I don't care.
waitpid $pid, 0;
}
package AsyncTimeout;
our $VERSION = '0.14';
our @ISA = 'Async';
sub new {
C<result()> takes an optional parameter, C<$force>. If C<$force> is
true, then the calling process will wait until the asynchronous
computation is complete before returning.
=head2 C<AsyncTimeout>
use Async;
$proc = AsyncTimeout->new( sub { ... }, $timeout, $special );
C<AsyncTimeout> implements a version of C<Async> that has an
automatic timeout. If the asynchronous computation does not complete
before C<$timeout> seconds have elapsed, it is forcibly terminated and
returns a special value C<$special>. The default special value is the
string "Timed out\n".
All the other methods for C<AsyncTimeout> are exactly the same as for
C<Async>.
=head2 C<AsyncData>
use Async;
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
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
lib/Attribute/TieClasses.pm view on Meta::CPAN
Shadow => 'HASH=Tie::ShadowHash',
Sort => 'HASH=Tie::SortHash',
Strict => 'HASH=Tie::StrictHash',
Substr => 'HASH=Tie::SubstrHash',
TextDir => 'HASH=Tie::TextDir',
Timeout => 'SCALAR=Tie::Scalar::Timeout',
Toggle => 'SCALAR=Tie::Toggle',
Transact => 'HASH=Tie::TransactHash',
TwoLevel => 'HASH=Tie::TwoLevelHash',
Vec => 'ARRAY=Tie::VecArray',
WarnGlobal => 'SCALAR=Tie::WarnGlobal::Scalar',
lib/Attribute/TieClasses.pm view on Meta::CPAN
version 1.101700
=head1 SYNOPSIS
use Attribute::TieClasses;
my $k : Timeout(EXPIRES => '+2s');
# loads in Tie::Scalar::Timeout and tie()s $k with those options
=head1 DESCRIPTION
Damian Conway's wonderful C<Attribute::Handlers> module provides
an easy way to use attributes for C<tie()>ing variables. In effect,
the code in the synopsis is simply
use Attribute::Handlers
autotie => { Timeout => 'Tie::Scalar::Timeout' };
Still, going one step further, it might be useful to have centrally
defined attributes corresponding to commonly used Tie classes found
on CPAN.
lib/Attribute/TieClasses.pm view on Meta::CPAN
Sort HASH Tie::SortHash
Sorted HASH Tie::SortHash
Strict HASH Tie::StrictHash
Substr HASH Tie::SubstrHash
TextDir HASH Tie::TextDir
Timeout SCALAR Tie::Scalar::Timeout
Toggle SCALAR Tie::Toggle
Transact HASH Tie::TransactHash
TwoLevel HASH Tie::TwoLevelHash
Vec ARRAY Tie::VecArray
Vector ARRAY Tie::VecArray
lib/Attribute/TieClasses.pm view on Meta::CPAN
Is more flexible than the other C<make_tie_*()> functions in that it checks the
type of the variable that the attribute is being applied to.
=head1 EXAMPLES
# Tie::Scalar::Timeout
my $m : Timeout(NUM_USES => 3, VALUE => 456, POLICY => 777);
print "$m\n" for 1..5;
# Tie::Hash::Rank
my %scores : Ranked;
%scores = (
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
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
examples/js/jquery-1.9.1.js view on Meta::CPAN
return;
}
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
if ( !document.body ) {
return setTimeout( jQuery.ready );
}
// Remember that the DOM is ready
jQuery.isReady = true;
examples/js/jquery-1.9.1.js view on Meta::CPAN
// Catch cases where $(document).ready() is called after the browser event has already occurred.
// we once tried to use readyState "interactive" here, but it caused issues like the one
// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
if ( document.readyState === "complete" ) {
// Handle it asynchronously to allow scripts the opportunity to delay ready
setTimeout( jQuery.ready );
// Standards-based browsers support DOMContentLoaded
} else if ( document.addEventListener ) {
// Use the handy event callback
document.addEventListener( "DOMContentLoaded", completed, false );
examples/js/jquery-1.9.1.js view on Meta::CPAN
try {
// Use the trick by Diego Perini
// http://javascript.nwbox.com/IEContentLoaded/
top.doScroll("left");
} catch(e) {
return setTimeout( doScrollCheck, 50 );
}
// detach all dom ready events
detach();
examples/js/jquery-1.9.1.js view on Meta::CPAN
delay: function( time, type ) {
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
type = type || "fx";
return this.queue( type, function( next, hooks ) {
var timeout = setTimeout( next, time );
hooks.stop = function() {
clearTimeout( timeout );
};
});
},
clearQueue: function( type ) {
return this.queue( type || "fx", [] );
examples/js/jquery-1.9.1.js view on Meta::CPAN
// Send global event
if ( fireGlobals ) {
globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
}
// Timeout
if ( s.async && s.timeout > 0 ) {
timeoutTimer = setTimeout(function() {
jqXHR.abort("timeout");
}, s.timeout );
}
try {
examples/js/jquery-1.9.1.js view on Meta::CPAN
// State is "done" now
state = 2;
// Clear timeout if it exists
if ( timeoutTimer ) {
clearTimeout( timeoutTimer );
}
// Dereference transport for early garbage collection
// (no matter how long the jqXHR object will be used)
transport = undefined;
examples/js/jquery-1.9.1.js view on Meta::CPAN
// if we're in sync mode we fire the callback
callback();
} else if ( xhr.readyState === 4 ) {
// (IE6 & IE7) if it's in cache and has been
// retrieved directly we need to fire the callback
setTimeout( callback );
} else {
handle = ++xhrId;
if ( xhrOnUnloadAbort ) {
// Create the active xhrs callbacks list if needed
// and attach the unload handler
examples/js/jquery-1.9.1.js view on Meta::CPAN
}]
};
// Animations created synchronously will run synchronously
function createFxNow() {
setTimeout(function() {
fxNow = undefined;
});
return ( fxNow = jQuery.now() );
}
view all matches for this distribution