AcePerl
view release on metacpan or search on metacpan
Ace/Browser/SiteDefs.pm view on Meta::CPAN
my $package = shift;
my $name = shift;
croak "Usage: getConfig(\$database_name)" unless defined $name;
$package = ref $package if ref $package;
my $file = "${name}.pm";
# make search relative to SiteDefs.pm file
my $path = $package->get_config || $package->resolveConf($file);
return unless -r $path;
return $CONFIG{$name} if exists $CONFIG{$name} and $CACHETIME{$name} >= (stat($path))[9];
return unless $CONFIG{$name} = $package->_load($path);
$CONFIG{$name}->{'name'} ||= $name; # remember name
$CACHETIME{$name} = (stat($path))[9];
return $CONFIG{$name};
}
sub modtime {
my $package = shift;
my $name = shift;
if (!$name && ref($package)) {
$name = $package->Name;
}
return $CACHETIME{$name};
util/install.PLS view on Meta::CPAN
next if $thing =~ /^\./; # not hidden files
next if $thing =~ /^\#/; # not autosave files
next if $thing =~ /~$/; # not autosave files
next if $thing eq 'CVS'; # not CVS directories
next if $thing eq 'core'; # not core files
if (-f "$base/$subdir/$thing") { # a regular file
my $result = copy("$base/$subdir/$thing","$dest/$subdir/$thing");
if ($result) {
my $mode = (stat("$base/$subdir/$thing"))[2];
chmod $mode,"$dest/$subdir/$thing";
}
print STDERR $result ? "OK: " : "FAILED: ","$base/$subdir/$thing => $dest/$subdir/$thing\n",
} elsif (-d "$base/$subdir/$thing") {
copy_tree($base,"$subdir/$thing",$dest);
}
}
}
( run in 1.031 second using v1.01-cache-2.11-cpan-49f99fa48dc )