App-FatPacker-Simple
view release on metacpan or search on metacpan
lib/App/FatPacker/Simple.pm view on Meta::CPAN
use warnings;
use experimental qw(lexical_subs signatures);
use App::FatPacker;
use Config;
use Cwd ();
use Distribution::Metadata;
use File::Basename ();
use File::Find ();
use File::Spec;
use File::Spec::Unix;
use Getopt::Long ();
use Perl::Strip;
use Pod::Usage ();
our $IGNORE_FILE = [
qr/\.pod$/,
qr/\.packlist$/,
qr/MYMETA\.json$/,
qr/install\.json$/,
];
lib/App/FatPacker/Simple.pm view on Meta::CPAN
$skip_dir = qr/\Q$skip_dir\E/;
my $find = sub (@) {
return unless -f $_;
for my $ignore ($IGNORE_FILE->@*) {
$_ =~ $ignore and return;
}
my $original = $_;
my $absolute = Cwd::abs_path($original);
return if $absolute =~ $skip_dir;
my $relative = File::Spec::Unix->abs2rel($absolute, $absolute_dir);
for my $exclude ($self->{exclude}->@*) {
if ($absolute eq $exclude) {
$self->debug("exclude $relative");
return;
}
}
if (!/\.(?:pm|ix|al|pl)$/) {
$self->warning("skip non perl module file $relative");
return;
}
( run in 2.315 seconds using v1.01-cache-2.11-cpan-64ef6c95b5d )