App-Skeletor
view release on metacpan or search on metacpan
lib/App/Skeletor.pm view on Meta::CPAN
if($expanded_path->is_file) {
$expanded_path->parent->mkpath;
if("$path"=~/\.ttt$/) {
my $data = $expanded_path->slurp;
$tt->process(\$data, \%template_var_names, \my $out);
my ($new_target_path) = ("$target_path" =~m/^(.+)\.ttt$/);
path($new_target_path)->touchpath;
my $fh = path($new_target_path)->openw;
print $fh $out;
close($fh);
path($new_target_path)->chmod($expanded_path->stat->mode);
} else {
$expanded_path->copy($target_path);
}
} elsif($path->is_dir) {
$target_path->mkpath;
} else {
print "Don't know want $path is!";
}
}, {recurse=>1});
( run in 0.322 second using v1.01-cache-2.11-cpan-496ff517765 )