Bio-ConnectDots
view release on metacpan or search on metacpan
lib/Bio/ConnectDots/scripts/update_connectorsets.pl view on Meta::CPAN
while( my ($cs_name,$localfile,$version,$ftpsite,$ftp_files) = $iterator->fetchrow_array() ) {
if($ftpsite && $ftp_files) {
if($CONNECTORSET) { next unless $cs_name eq $CONNECTORSET; } # limit to one CS
print "### Checking for new version of $cs_name from $ftpsite\n";
my $directories = parse_files($ftp_files); # hash on directory of a list of files to get.
# determine version of local file
my $local_version = get_file_date($localfile);
# initialize the ftp server
my %netftp_cfg = (Debug => 0, Timeout => 120);
my %common_cfg = ( User => 'anonymous',
Pass => 'anonymous@here.net',
Host => $ftpsite,
RemoteDir => '/', # automatic CD on remote machine to RemoteDir
Type => 'A' # overwrite I (binary) TYPE default
);
my $ftp = Net::FTP::Common->new(\%common_cfg, %netftp_cfg);
# check files exist and if new
my $existnew=0; # true if any files are newer than local file
( run in 0.360 second using v1.01-cache-2.11-cpan-fd5d4e115d8 )