App-cpanm-meta-checker
view release on metacpan or search on metacpan
maint/mk_fatlib.pl view on Meta::CPAN
my @buildcandidates = grep { $_->is_dir }
grep { $_->basename =~ /\AApp-cpanm-meta-checker-/ } $root->children;
if ( not @buildcandidates ) {
die "No build candidates";
}
my ($last) =
[ sort { $b->stat->mtime <=> $a->stat->mtime } @buildcandidates ]->[0];
print "Making fatlib using $last\n";
sub withlib(&) {
my ($code) = @_;
my $oldopts = $ENV{PERL5OPT} || '';
my @oldlib = split /:/, $ENV{PERL5LIB} || '';
# local $ENV{PERL5OPT} = "$oldopts -I${last}/lib";
local $ENV{PERL5LIB} = join q[:], $last->child('lib'), @oldlib;
#STDERR->print("\e[31mPERL5OPT=$ENV{PERL5OPT}\e[0m\n");
return $code->();
}
sub inbuild(&) {
my ($code) = @_;
chdir $last;
$code->();
chdir $cwd;
}
inbuild {
withlib {
STDERR->print("Tracing module load...\n");
system( 'fatpack', 'trace', 'bin/cpanm-meta-checker' ) == 0 or die;
maint/mk_fatlib_release.pl view on Meta::CPAN
use Path::Tiny qw(path);
use Capture::Tiny qw( capture_stdout );
use FindBin;
my $cwd = path('.')->absolute;
my $root = path($FindBin::Bin)->parent->absolute;
my ($last) = $root;
print "Making fatlib using $root\n";
sub withlib(&) {
my ($code) = @_;
my $oldopts = $ENV{PERL5OPT} || '';
my @oldlib = split /:/, $ENV{PERL5LIB} || '';
# local $ENV{PERL5OPT} = "$oldopts -I${last}/lib";
local $ENV{PERL5LIB} = join q[:], $last->child('lib'), @oldlib;
#STDERR->print("\e[31mPERL5OPT=$ENV{PERL5OPT}\e[0m\n");
return $code->();
}
sub inbuild(&) {
my ($code) = @_;
chdir $last;
$code->();
chdir $cwd;
}
inbuild {
withlib {
STDERR->print("Tracing module load...\n");
system( 'fatpack', 'trace', 'bin/cpanm-meta-checker' ) == 0 or die;
maint/mk_fatpack.pl view on Meta::CPAN
my @buildcandidates = grep { $_->is_dir }
grep { $_->basename =~ /\AApp-cpanm-meta-checker-/ } $root->children;
if ( not @buildcandidates ) {
die "No build candidates";
}
my ($last) =
[ sort { $b->stat->mtime <=> $a->stat->mtime } @buildcandidates ]->[0];
print "Making fatlib using $last\n";
sub withlib(&) {
my ($code) = @_;
my $oldopts = $ENV{PERL5OPT} || '';
my @oldlib = split /:/, $ENV{PERL5LIB} || '';
# local $ENV{PERL5OPT} = "$oldopts -I${last}/lib";
local $ENV{PERL5LIB} = join q[:], $last->child('lib'), @oldlib;
#STDERR->print("\e[31mPERL5OPT=$ENV{PERL5OPT}\e[0m\n");
return $code->();
}
sub inbuild(&) {
my ($code) = @_;
chdir $last;
$code->();
chdir $cwd;
}
inbuild {
withlib {
STDERR->print("Packing...\n");
my $file = capture_stdout {
maint/mk_fatpack_release.pl view on Meta::CPAN
use utf8;
use Path::Tiny qw(path);
use Capture::Tiny qw( capture_stdout );
use FindBin;
my $cwd = path('.')->absolute;
my $root = path($FindBin::Bin)->parent->absolute;
my ($last) = $root;
print "Making fatlib using $last\n";
sub withlib(&) {
my ($code) = @_;
my $oldopts = $ENV{PERL5OPT} || '';
my @oldlib = split /:/, $ENV{PERL5LIB} || '';
# local $ENV{PERL5OPT} = "$oldopts -I${last}/lib";
local $ENV{PERL5LIB} = join q[:], $last->child('lib'), @oldlib;
#STDERR->print("\e[31mPERL5OPT=$ENV{PERL5OPT}\e[0m\n");
return $code->();
}
sub inbuild(&) {
my ($code) = @_;
chdir $last;
$code->();
chdir $cwd;
}
inbuild {
withlib {
STDERR->print("Packing...\n");
my $file = capture_stdout {
maint/prep_tempfatlib.pl view on Meta::CPAN
my @buildcandidates = grep { $_->is_dir }
grep { $_->basename =~ /\AApp-cpanm-meta-checker-/ } $root->children;
if ( not @buildcandidates ) {
die "No build candidates";
}
my ($last) =
[ sort { $b->stat->mtime <=> $a->stat->mtime } @buildcandidates ]->[0];
print "Making fatlib using $last\n";
sub withlib(&) {
my ($code) = @_;
my $oldopts = $ENV{PERL5OPT} || '';
my @oldlib = split /:/, $ENV{PERL5LIB} || '';
# local $ENV{PERL5OPT} = "$oldopts -I${last}/lib";
local $ENV{PERL5LIB} = join q[:], $last->child('lib'), @oldlib;
#STDERR->print("\e[31mPERL5OPT=$ENV{PERL5OPT}\e[0m\n");
return $code->();
}
sub inbuild(&) {
my ($code) = @_;
chdir $last;
$code->();
chdir $cwd;
}
system( 'cp', '-Trv', $cwd->child('fatlib'), $last->child('fatlib') );
maint/prep_tempfatlib_stripped.pl view on Meta::CPAN
my @buildcandidates = grep { $_->is_dir }
grep { $_->basename =~ /\AApp-cpanm-meta-checker-/ } $root->children;
if ( not @buildcandidates ) {
die "No build candidates";
}
my ($last) =
[ sort { $b->stat->mtime <=> $a->stat->mtime } @buildcandidates ]->[0];
print "Making fatlib using $last\n";
sub withlib(&) {
my ($code) = @_;
my $oldopts = $ENV{PERL5OPT} || '';
my @oldlib = split /:/, $ENV{PERL5LIB} || '';
# local $ENV{PERL5OPT} = "$oldopts -I${last}/lib";
local $ENV{PERL5LIB} = join q[:], $last->child('lib'), @oldlib;
#STDERR->print("\e[31mPERL5OPT=$ENV{PERL5OPT}\e[0m\n");
return $code->();
}
sub inbuild(&) {
my ($code) = @_;
chdir $last;
$code->();
chdir $cwd;
}
system( 'cp', '-Trv', $cwd->child('fatlib'), $last->child('fatlib') );
STDERR->print("Stripping...\n");
maint/strip_release.pl view on Meta::CPAN
use utf8;
use Path::Tiny qw(path);
use Capture::Tiny qw( capture_stdout );
use FindBin;
my $cwd = path('.')->absolute;
my $root = path($FindBin::Bin)->parent->absolute;
my ($last) = $root;
print "Making fatlib using $last\n";
sub withlib(&) {
my ($code) = @_;
my $oldopts = $ENV{PERL5OPT} || '';
my @oldlib = split /:/, $ENV{PERL5LIB} || '';
# local $ENV{PERL5OPT} = "$oldopts -I${last}/lib";
local $ENV{PERL5LIB} = join q[:], $last->child('lib'), @oldlib;
#STDERR->print("\e[31mPERL5OPT=$ENV{PERL5OPT}\e[0m\n");
return $code->();
}
sub inbuild(&) {
my ($code) = @_;
chdir $last;
$code->();
chdir $cwd;
}
STDERR->print("Stripping...\n");
for my $wd (qw( fatlib lib )) {
( run in 1.602 second using v1.01-cache-2.11-cpan-49f99fa48dc )