view release on metacpan or search on metacpan
lib/Business/PayPal/NVP.pm view on Meta::CPAN
our $VERSION = '1.10';
our $AUTOLOAD;
our $Debug = 0;
our $Branch = 'test';
our $Timeout= 0;
our $UserAgent;
use LWP::UserAgent ();
use URI::Escape ();
use Carp 'croak';
lib/Business/PayPal/NVP.pm view on Meta::CPAN
my %args = @_;
my $self = bless \(my $ref), $class;
$Branch = $args{branch} || 'test';
$Timeout = $args{timeout};
$UserAgent = $args{ua} || LWP::UserAgent->new;
if (ref $UserAgent ne 'LWP::UserAgent') {
die "ua must be a LWP::UserAgent object\n";
}
lib/Business/PayPal/NVP.pm view on Meta::CPAN
sub _do_request {
my $self = shift;
my %args = @_;
my $lwp = $UserAgent;
$lwp->timeout($Timeout) if $Timeout;
$lwp->agent("perl-Business-PayPal-NVP/$VERSION");
my $req = HTTP::Request->new( POST => $self->AUTH_CRED('url') );
$req->content_type( 'application/x-www-form-urlencoded' );
my $content = _build_content( USER => $self->AUTH_CRED('user'),
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
bin/utv_usage_applet.pl view on Meta::CPAN
$label = Gtk2::Label->new( "loading" );
$icon->add( $label );
update_text();
$icon->show_all;
Glib::Timeout->add ( 3600000 , \&update_text );
Gtk2->main;
exit(0);
}
else
view all matches for this distribution
view release on metacpan or search on metacpan
examples/web/Scripts/jquery-1.4.4.min.js view on Meta::CPAN
h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;k<J.length;k++){h=J[k];h.origType.rep...
h.preType==="mouseleave"){a.type=h.preType;e=c(a.relatedTarget).closest(h.selector)[0]}if(!e||e!==l)C.push({elem:l,handleObj:h,level:r.level})}}}o=0;for(x=C.length;o<x;o++){f=C[o];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a...
"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.no...
e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"...
"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&...
a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isRea...
C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(...
s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s)...
j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(...
toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z....
-1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b....
if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K<Q;K++)if((j=arguments[K])!=null)for(s in j){v=G[s];z=j[s];if(G!==z)if(ga&&z&&(b.isPlainObject(z)||(H=b.isArray(z)))){if(H){...
if(!b.readyWait||j!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,1);b.isReady=true;if(!(j!==true&&--b.readyWait>0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function...
b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof...
!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if...
l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},node...
z,j[z])===false)break}else for(v=j[0];H<G&&s.call(v,H,v)!==false;v=j[++H]);return j},trim:O?function(j){return j==null?"":O.call(j)}:function(j){return j==null?"":j.toString().replace(k,"").replace(o,"")},makeArray:function(j,s){var v=s||[];if(j!=nul...
s){var v=j.length,z=0;if(typeof s.length==="number")for(var H=s.length;z<H;z++)j[v++]=s[z];else for(;s[z]!==B;)j[v++]=s[z++];j.length=v;return j},grep:function(j,s,v){var z=[],H;v=!!v;for(var G=0,K=j.length;G<K;G++){H=!!s(j[G],G);v!==H&&z.push(j[G])}...
examples/web/Scripts/jquery-1.4.4.min.js view on Meta::CPAN
"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja...
c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},...
else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(...
a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(b===B){d=this.triggerHandler("getData"+k[1]+"!",[k[0]]);if(d===B&&this.length){d=c.data(this[0],a);d=ka(this[0],a,d)}return d===B&&k[1]?this.data(k[0]):d}else return this.each(function(){var o=c(this),...
c.data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,...
a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var sa=/[\n\t]/g,ha=/\s+/,Sa=/\r/g,Ta=/^(?:hr...
colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.remov...
1)if(f.className){for(var h=" "+f.className+" ",l=f.className,k=0,o=b.length;k<o;k++)if(h.indexOf(" "+b[k]+" ")<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o...
l=0,k=b.length;l<k;l++)h=h.replace(" "+b[l]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a....
"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return tr...
if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d...
examples/web/Scripts/jquery-1.4.4.min.js view on Meta::CPAN
!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url...
false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.u...
A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;...
b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequ...
c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadyst...
c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTi...
encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0...
[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c...
e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentE...
if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle...
3),a,b,d);else{d=0;for(var e=this.length;d<e;d++){a=this[d];b=a.style.display;if(!c.data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&c.css(a,"display")==="none"&&c.data(a,"olddisplay",qa(a.nodeName))}for(d=0;d<e;d++){a=this[d];b=a.style....
view all matches for this distribution
view release on metacpan or search on metacpan
my $host = 'xisbn.worldcat.org';
my $socket = IO::Socket::INET->new(
PeerAddr => "$host:80",
Timeout => 5,
);
unless( $socket )
{
print STDERR <<"HERE";
view all matches for this distribution
view release on metacpan or search on metacpan
share/www/static/bootstrap/js/bootstrap.min.js view on Meta::CPAN
/*!
* Bootstrap v3.1.1 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransiti...
view all matches for this distribution
view release on metacpan or search on metacpan
buzzsaw.sql view on Meta::CPAN
END IF;
END IF;
-- Check if the file is currently being processed.
-- Timeout any processing entries after 1 hour
DELETE FROM current_processing
WHERE starttime < current_timestamp - interval '1 hour';
SELECT COUNT(*) INTO logcount
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
src/sparse-0.4.4/perl/t/include/hw/pci/pci_regs.h view on Meta::CPAN
#define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */
#define PCI_ERR_UNC_TRAIN 0x00000001 /* Training */
#define PCI_ERR_UNC_DLP 0x00000010 /* Data Link Protocol */
#define PCI_ERR_UNC_POISON_TLP 0x00001000 /* Poisoned TLP */
#define PCI_ERR_UNC_FCP 0x00002000 /* Flow Control Protocol */
#define PCI_ERR_UNC_COMP_TIME 0x00004000 /* Completion Timeout */
#define PCI_ERR_UNC_COMP_ABORT 0x00008000 /* Completer Abort */
#define PCI_ERR_UNC_UNX_COMP 0x00010000 /* Unexpected Completion */
#define PCI_ERR_UNC_RX_OVER 0x00020000 /* Receiver Overflow */
#define PCI_ERR_UNC_MALF_TLP 0x00040000 /* Malformed TLP */
#define PCI_ERR_UNC_ECRC 0x00080000 /* ECRC Error Status */
src/sparse-0.4.4/perl/t/include/hw/pci/pci_regs.h view on Meta::CPAN
#define PCI_ERR_COR_STATUS 16 /* Correctable Error Status */
#define PCI_ERR_COR_RCVR 0x00000001 /* Receiver Error Status */
#define PCI_ERR_COR_BAD_TLP 0x00000040 /* Bad TLP Status */
#define PCI_ERR_COR_BAD_DLLP 0x00000080 /* Bad DLLP Status */
#define PCI_ERR_COR_REP_ROLL 0x00000100 /* REPLAY_NUM Rollover */
#define PCI_ERR_COR_REP_TIMER 0x00001000 /* Replay Timer Timeout */
#define PCI_ERR_COR_MASK 20 /* Correctable Error Mask */
/* Same bits as above */
#define PCI_ERR_CAP 24 /* Advanced Error Capabilities */
#define PCI_ERR_CAP_FEP(x) ((x) & 31) /* First Error Pointer */
#define PCI_ERR_CAP_ECRC_GENC 0x00000020 /* ECRC Generation Capable */
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
sleep 2; # wait for server
require IO::Socket;
my $s = IO::Socket::INET->new(PeerAddr => "localhost:$PORT",
Timeout => 10);
ok($s, 'server is running');
if ($s)
{
close $s;
}
view all matches for this distribution
view release on metacpan or search on metacpan
SKIP:
{
require IO::Socket;
my $s = IO::Socket::INET->new(PeerAddr => "localhost:$PORT",
Timeout => 10);
if (!$s)
{
skip(
"The test server is not running. Run via: './t/soap.pl $PORT &'\n" .
"(the server runs for about ten minutes before turning itself off)\n" .
view all matches for this distribution
view release on metacpan or search on metacpan
src_bin/cape_utils view on Meta::CPAN
Format :: mm-dd-yyy HH:MM:ss
=head3 --timeout <timeout
Timeout value in seconds.
Default :: 200
=head3 --machine <machine>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CCCP/LiveMX.pm view on Meta::CPAN
=head1 PACKAGE VARIABLES
=head2 $CCCP::LiveMX::timeout
Timeout for ping, resolve and another.
By default 5 sec.
=head1 METHODS
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CDDB.pm view on Meta::CPAN
);
$self->{handle} = new IO::Socket::INET(
PeerAddr => $self->{host},
PeerPort => $self->{port},
Proto => 'tcp',
Timeout => 30,
);
# The host did not answer. Clean up after the failed attempt
# and cycle to the next host.
unless (defined $self->{handle}) {
view all matches for this distribution
view release on metacpan or search on metacpan
getHostname
getHostType
getLastFinishedBackupTaskInfo
getQuota
getRemotePort
getTimeout
isCdpForMySqlAddonEnabled
isControlPanelModuleEnabled
isEnabled
isHostDiscoveryFinished
removeUser
setLinuxHostType
setQuota
setRemotePort
setsCdpForMySqlAddonEnabled
setsControlPanelModuleEnabled
setTimeout
setWindowsHostType
addLocalMySQLInstance
addRemoteMySQLInstance
deleteMySQLInstance
view all matches for this distribution
view release on metacpan or search on metacpan
sub collectWatch {
my $o = shift;
my $label = shift;
my $value = shift;
$o->{watchTimeout} = 60000;
}
sub new {
my $class = shift;
my $actor = shift;
$o->{store} = $o->{actor}->preferredStore if ! $o->{store};
$o->{actorHash} = $o->{actor}->preferredActorHash if ! $o->{actorHash};
my $boxToken = CDS::BoxToken->new(CDS::AccountToken->new($o->{store}, $o->{actorHash}), $o->{boxLabel});
my $args = ['--output', '.cds-curl-list'];
push @$args, '-H', 'Condensation-Watch: '.$o->{watchTimeout}.' ms' if $o->{watchTimeout};
$o->curlRequest('GET', $boxToken->url, $args);
}
sub curlModify {
my $o = shift;
sub collectWatch {
my $o = shift;
my $label = shift;
my $value = shift;
$o->{watchTimeout} = 60000;
}
sub new {
my $class = shift;
my $actor = shift;
$o->{ui}->space;
$o->{ui}->title($o->{actor}->blueBoxReference($boxToken));
# Query the store
my $store = $boxToken->accountToken->cliStore;
my ($hashes, $storeError) = $store->list($boxToken->accountToken->actorHash, $boxToken->boxLabel, $o->{watchTimeout} // 0, $o->{keyPairToken}->keyPair);
return if defined $storeError;
# Print the result
my $count = scalar @$hashes;
return if ! $count;
root => $root,
store => $store,
checkPutHash => $checkPutHash,
checkEnvelopeHash => $checkPutHash,
checkSignatures => $checkSignatures,
maximumWatchTimeout => 0,
};
}
sub process {
my $o = shift;
return $request->reply403 if ! $o->verifyList($actorHash, $accountHash, $boxLabel);
}
my $watch = $request->headers->{'condensation-watch'} // '';
my $timeout = $watch =~ /^(\d+)\s*ms$/ ? $1 + 0 : 0;
$timeout = $o->{maximumWatchTimeout} if $timeout > $o->{maximumWatchTimeout};
my ($hashes, $error) = $o->{store}->list($accountHash, $boxLabel, $timeout);
return $request->replyFatalError($error) if defined $error;
return $request->reply200Bytes(join('', map { $_->bytes } @$hashes));
}
sub new {
my $class = shift;
my $pool = shift;
my $actorOnStore = shift; die 'wrong type '.ref($actorOnStore).' for $actorOnStore' if defined $actorOnStore && ref $actorOnStore ne 'CDS::ActorOnStore';
my $streamTimeout = shift;
return bless {
pool => $pool,
actorOnStore => $actorOnStore,
streamCache => CDS::StreamCache->new($pool, $actorOnStore, $streamTimeout // CDS->MINUTE),
entries => {},
};
}
sub pool { shift->{pool} }
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/06_timeout.t view on Meta::CPAN
use CGI ();
our %STORE;
{
package TestAppTimeout;
use base qw(CGI::Application);
use CGI::Application::Plugin::Authentication;
__PACKAGE__->authen->config(
t/06_timeout.t view on Meta::CPAN
my ($now, $query, $cgiapp, $results);
diag('The following tests have some small time delays');
$query = CGI->new( { authen_username => 'user', authen_password => '123', rm => 'two' } );
$cgiapp = TestAppTimeout->new( QUERY => $query );
$results = $cgiapp->run;
ok( $cgiapp->authen->is_authenticated,'successful login' );
is( $cgiapp->authen->username, 'user', 'username set' );
is( $STORE{username}, 'user', 'username set in store' );
t/06_timeout.t view on Meta::CPAN
# Sleep so we know if the last_access time is updated
select(undef, undef, undef, 1.1);
$query = CGI->new( { rm => 'two' } );
$cgiapp = TestAppTimeout->new( QUERY => $query );
$results = $cgiapp->run;
ok( $STORE{last_access} > $STORE{last_login}, 'last access updated on next request' );
t/06_timeout.t view on Meta::CPAN
ok( !$cgiapp->authen->is_authenticated, 'user logged out' );
ok( !$cgiapp->authen->is_login_timeout, 'logout not caused by timeout' );
{
package TestAppTimeoutIDLE_FOR;
use base qw(TestAppTimeout);
__PACKAGE__->authen->config(
DRIVER => [ 'Generic', { user => '123' } ],
STORE => [ 'Store::Dummy', \%STORE ],
LOGIN_SESSION_TIMEOUT => {
t/06_timeout.t view on Meta::CPAN
);
}
# login again
$query = CGI->new( { authen_username => 'user', authen_password => '123', rm => 'two' } );
$cgiapp = TestAppTimeout->new( QUERY => $query );
$results = $cgiapp->run;
# Sleep so we have enough idle time
select(undef, undef, undef, 1.1);
$query = CGI->new( { rm => 'two' } );
$cgiapp = TestAppTimeoutIDLE_FOR->new( QUERY => $query );
$results = $cgiapp->run;
ok( !$cgiapp->authen->is_authenticated, 'IDLE_FOR idle time exceeded so user logged out' );
ok( $cgiapp->authen->is_login_timeout, 'logout caused by timeout' );
{
package TestAppTimeoutEVERY;
use base qw(TestAppTimeout);
__PACKAGE__->authen->config(
DRIVER => [ 'Generic', { user => '123' } ],
STORE => [ 'Store::Dummy', \%STORE ],
LOGIN_SESSION_TIMEOUT => {
t/06_timeout.t view on Meta::CPAN
);
}
# login again
$query = CGI->new( { authen_username => 'user', authen_password => '123', rm => 'two' } );
$cgiapp = TestAppTimeoutEVERY->new( QUERY => $query );
$results = $cgiapp->run;
# Sleep so we have enough idle time
select(undef, undef, undef, 1.1);
$query = CGI->new( { rm => 'two' } );
$cgiapp = TestAppTimeoutEVERY->new( QUERY => $query );
$results = $cgiapp->run;
ok( !$cgiapp->authen->is_authenticated, 'EVERY idle time exceeded so user logged out' );
{
package TestAppTimeoutCUSTOM;
use base qw(TestAppTimeout);
__PACKAGE__->authen->config(
DRIVER => [ 'Generic', { user => '123' } ],
STORE => [ 'Store::Dummy', \%STORE ],
LOGIN_SESSION_TIMEOUT => {
t/06_timeout.t view on Meta::CPAN
);
}
# login again
$query = CGI->new( { authen_username => 'user', authen_password => '123', rm => 'two' } );
$cgiapp = TestAppTimeoutCUSTOM->new( QUERY => $query );
$results = $cgiapp->run;
# no need to sleep here
$query = CGI->new( { rm => 'two' } );
$cgiapp = TestAppTimeoutCUSTOM->new( QUERY => $query );
$results = $cgiapp->run;
ok( !$cgiapp->authen->is_authenticated, 'CUSTOM idle time exceeded so user logged out' );
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