Template-Toolkit
view release on metacpan or search on metacpan
lib/Template/App/ttree.pm view on Meta::CPAN
(undef, undef, $mode, undef, $uid, $gid, undef, undef,
undef, undef, undef, undef, undef) = stat($abspath);
# create target directory if required
$target = "$destdir/$path";
unless (-d $target || $dryrun) {
mkpath($target, $verbose, $mode) or
die red("Could not mkpath ($target): $!\n");
# commented out by abw on 2000/12/04 - seems to raise a warning?
# chown($uid, $gid, $target) || warn "chown($target): $!\n";
$$n_mkdir++;
$self->emit_log( green( sprintf " + %-32s (created target directory)\n", $path ) )
if $verbose;
}
# recurse into directory
$self->process_tree($path, $running_conf);
}
else {
$$n_skip++;
lib/Template/App/ttree.pm view on Meta::CPAN
}
}
# check against copy list
if ($copy_file) {
$$n_copy++;
unless ($dryrun) {
copy($absfile, $dest) or die red("Could not copy ($absfile to $dest) : $!\n");
if ($preserve) {
chown($uid, $gid, $dest) || $self->emit_warn( red("chown($dest): $!\n") );
chmod($mode, $dest) || $self->emit_warn( red("chmod($dest): $!\n") );
}
}
$self->emit_log( green( sprintf " > %-32s (copied, matches $check)\n", $file ) )
if $verbose;
return;
}
lib/Template/App/ttree.pm view on Meta::CPAN
$self->emit_log( "\n" );
}
# process file
unless ($dryrun) {
$template->process($file, $replace, $destfile,
$binmode ? {binmode => $binmode} : {})
|| $self->emit_log(red(" ! "), $template->error(), "\n");
if ($preserve) {
chown($uid, $gid, $dest) || $self->emit_warn( red("chown($dest): $!\n") );
chmod($mode, $dest) || $self->emit_warn( red("chmod($dest): $!\n") );
}
}
}
#------------------------------------------------------------------------
# $self->dependencies($file, $depends)
#
# Read the dependencies from $file, if defined, and merge in with
( run in 1.880 second using v1.01-cache-2.11-cpan-5511b514fd6 )