Bio-GMOD
view release on metacpan or search on metacpan
GMOD/Util/CheckVersions.pm view on Meta::CPAN
#}
# Read the contents of a provided symlink (or path) to parse out a version
# Returning the full path the symlink points at, the installed version
# and its modtime
sub read_symlink {
my ($self,$path) = @_;
my $realdir = -l $path ? readlink $path : $path;
my ($root) = $path =~ /(.*\/).*/;
my $full_path = $root . "/$realdir";
my @temp = stat($full_path);
my $modtime = localtime($temp[9]);
return ($realdir,$modtime);
}
##################################
# PRIVATE METHODS
##################################
GMOD/Util/Mirror.pm view on Meta::CPAN
# mirror a file
sub get_file {
my $self = shift;
my ($path,$mode) = @_;
my $ftp = $self->ftp;
my $rtime = $ftp->mdtm($path);
my $rsize = $ftp->size($path);
$mode = ($self->parse_listing($ftp->dir($path)))[2] unless defined $mode;
my ($lsize,$ltime) = stat($path) ? (stat(_))[7,9] : (0,0);
if ( defined($rtime) and defined($rsize)
and ($ltime >= $rtime)
and ($lsize == $rsize) ) {
$self->warning(-msg => "Getting file $path: not newer than local copy.") if $self->verbose;
return 1;
}
$self->logit(-msg => "Downloading file $path");
$ftp->get($path) or ($self->warning(-msg=>$ftp->message) and return);
chmod $mode,$path if $mode;
cgi-bin/version.wormbase.PLS view on Meta::CPAN
my $to_display = { database => { title=>1,version =>1,release=>1},
# code => { version=>1,build =>1},
# resources=> { memory=>1,classes=>1},
};
my %status = $DB->status;
my $version = $status{database}->{version};
my $title = $status{database}->{title};
# Fetch the modtime of the current release.
my @temp = stat('/usr/local/acedb/' . "elegans_$version");
my $modtime = localtime($temp[9]);
# Fetch the modtime of the package release
my @package_temp = stat('/usr/local/ftp/pub/wormbase/database_tarballs/' . "$version");
my $package_modtime = localtime($package_temp[9]);
print qq{<?xml version="1.0" encoding="UTF-8"?>\n};
print qq{<!DOCTYPE mod_version SYSTEM "http://www.wormbase.org/dtd/gmod/version.dtd">};
print "<mod_version>\n";
print "<name>WormBase</name>\n";
print "<description>$title</description>\n";
print "<version>$version</version>\n";
print "<release_date>$modtime</release_date>\n";
( run in 1.156 second using v1.01-cache-2.11-cpan-49f99fa48dc )