App-Gallery
view release on metacpan or search on metacpan
lib/App/Gallery.pm view on Meta::CPAN
sub run {
my (undef, $args, @images) = @_;
my %args = (%default_args, %$args);
my $full = catfile $args{out}, 'full';
my $thumb = catfile $args{out}, 'thumb';
my $tmpl = HTML::Template::Compiled->new(
(($args{tmpl} // '') eq '')
? (scalarref => \$default_template)
: (filename => $args{tmpl}),
default_escape => 'HTML',
);
make_path $full, $thumb;
for my $path (@images) {
my $basename = fileparse $path;
my $thumb_path = catfile $thumb, $basename;
my $dest_path = catfile $full, $basename;
link $path, $dest_path or cp $path, $dest_path or die "$!";
( run in 0.364 second using v1.01-cache-2.11-cpan-c21f80fb71c )