AWS-Lambda
view release on metacpan or search on metacpan
- perl 5.28.2 is released
0.0.3 2019-04-18T06:17:14Z
- Added missing prereq URI::Escape as suggested by CPANTS. #13 (thx @manwar)
0.0.2 2019-04-17T07:14:14Z
- set SCRIPT_NAME environment value (fixes #7)
- install Plack::Middleware::ReverseProxy
0.0.1 2019-03-10T06:01:37Z
- original version
author/pod-stripper/scripts/pod_stripper.pl view on Meta::CPAN
use warnings;
use strict;
use File::Find ();
use Pod::Strip;
use autodie;
sub wanted;
sub dostrip;
sub delete_pod;
my $original_bytes = 0;
my $final_bytes = 0;
use Cwd ();
my $cwd = Cwd::cwd();
my @dirs;
if (@ARGV) {
@dirs = @ARGV;
} else {
@dirs = ('local/');
}
# Traverse desired filesystems
File::Find::find({wanted => \&wanted}, @dirs);
say "Original module size: $original_bytes";
say "Stripped to: $final_bytes";
say sprintf "Won %0.02f%%", (1- ($final_bytes / $original_bytes)) * 100;
exit;
sub wanted {
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size);
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size) = lstat($_);
$original_bytes += $size;
if (-f $_ && /^.*\.pm\z/s) {
dostrip($_);
}
if (-f _ && /^.*\.pod\z/s) {
delete_pod($_);
}
$final_bytes += (-s $_ // 0);
author/pod-stripper/scripts/pod_stripper.pl view on Meta::CPAN
$module = <$pm>;
close $pm
}
# it is not pod, but might be some data.
# skip it for safety.
if ($module =~ /^__DATA__$/m) {
return
}
# We unlink the original pm
unlink $file;
open my $pm, '>', $file;
$strip->output_fh($pm);
$strip->parse_string_document($module);
close $pm;
}
( run in 0.500 second using v1.01-cache-2.11-cpan-f985c23238c )