App-Framework
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
inc/Module/Install/Fetch.pm view on Meta::CPAN
require Cwd;
my $dir = Cwd::getcwd();
chdir $args{local_dir} or return if exists $args{local_dir};
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;
} }
elsif (my $ftp = $self->can_run('ftp')) { eval {
# no Net::FTP, fallback to ftp.exe
require FileHandle;
my $fh = FileHandle->new;
lib/App/Framework/Feature/Run.pm view on Meta::CPAN
an ARRAY reference, where the ARRAY contains the lines of text output (one array entry per line).
NOTE: the lines have the original trailing newline B<removed>.
my $results_aref = $app->run()->results ;
foreach my $line (@$results_aref)
{
print "$line\n";
}
=head2 Timeout
If you specify a L</timeout> then the command is executed as normal but will be aborted if it runs for longer than the specified time.
This can be useful, for example, for running commands that don't normally terminate (or run on much longer than is necessary).
=head2 Callbacks
There are 2 optional callback routines that may be specified:
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.376 second using v1.00-cache-2.02-grep-82fe00e-cpan-f5108d614456 )