App-Glacier
view release on metacpan or search on metacpan
lib/App/Glacier/Command/Put.pm view on Meta::CPAN
} else {
exit $code;
}
}
sub _upload {
my ($self, $vaultname, $localname, $remotename) = @_;
$remotename = basename($localname) unless defined($remotename);
my $st = stat($localname)
or $self->abend(EX_NOINPUT, "can't stat \"$localname\": $!");
unless (S_ISREG($st->mode)) {
$self->abend(EX_NOPERM, "\"$localname\" is not a regular file");
}
my $size = $st->size;
if ($size == 0) {
$self->abend(EX_NOPERM, "\"$localname\": file has zero size");
}
my $dir = $self->directory($vaultname);
lib/App/Glacier/Config.pm view on Meta::CPAN
if (exists($descr->{section})) {
$self->fixup($descr->{section}, @_, $kv);
} elsif (exists($descr->{default}) && !$self->isset(@_, $kv)) {
$self->set(@_, $kv, $descr->{default});
}
}
}
sub file_up_to_date {
my ($self, $file) = @_;
my $st_conf = stat($self->{filename}) or return 1;
my $st_file = stat($file)
or carp "can't stat $file: $!";
return $st_conf->mtime <= $st_file->mtime;
}
=head2 $cfg->parse()
Parses the configuration file and stores the data in the object. Returns
true on success and false on failure. Eventual errors in the configuration
are reported using B<error>.
( run in 1.390 second using v1.01-cache-2.11-cpan-49f99fa48dc )