view release on metacpan or search on metacpan
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
$self->autosplit_file($_, $blib) for ref($split) ? @$split : ($split);
}
foreach my $element (@{$self->build_elements}) {
my $method = "process_${element}_files";
$method = "process_files_by_extension" unless $self->can($method);
$self->$method($element);
}
$self->depends_on('config_data');
}
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
$self->log_info("Building " . $self->dist_name . "\n");
$self->depends_on('code');
$self->depends_on('docs');
}
sub process_files_by_extension {
my ($self, $ext) = @_;
my $method = "find_${ext}_files";
my $files = $self->can($method) ? $self->$method() : $self->_find_file_by_type($ext, 'lib');
foreach my $file (sort keys %$files) {
$self->copy_if_modified(from => $file, to => File::Spec->catfile($self->blib, $files->{$file}) );
}
}
sub process_support_files {
my $self = shift;
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
# root for all File::ShareDir paths
my $share_prefix = File::Spec->catdir($self->blib, qw/lib auto share/);
# copy all share files to blib
foreach my $file (sort keys %$files) {
$self->copy_if_modified(
from => $file, to => File::Spec->catfile( $share_prefix, $files->{$file} )
);
}
}
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
croak 'Can\'t build xs files under --pureperl-only' if %$files && $self->pureperl_only;
foreach my $from (sort keys %$files) {
my $to = $files->{$from};
unless ($from eq $to) {
$self->add_to_cleanup($to);
$self->copy_if_modified( from => $from, to => $to );
}
$self->process_xs($to);
}
}
sub process_pod_files { shift()->process_files_by_extension(shift()) }
sub process_pm_files { shift()->process_files_by_extension(shift()) }
sub process_script_files {
my $self = shift;
my $files = $self->find_script_files;
return unless keys %$files;
my $script_dir = File::Spec->catdir($self->blib, 'script');
File::Path::mkpath( $script_dir );
foreach my $file (sort keys %$files) {
my $result = $self->copy_if_modified($file, $script_dir, 'flatten') or next;
$self->fix_shebang_line($result) unless $self->is_vmsish;
$self->make_executable($result);
}
}
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
File::Spec->rel2abs( $dir ) );
my $to_file =
File::Spec->catfile( $ppm, 'blib',
exists( $types{$type} ) ? $types{$type} : $type,
$rel_file );
$self->copy_if_modified( from => $file, to => $to_file );
}
}
foreach my $type ( qw(bin lib) ) {
$self->htmlify_pods( $type, File::Spec->catdir($ppm, 'blib', 'html') );
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
$self->log_info("Creating $dist_dir\n");
$self->add_to_cleanup($dist_dir);
foreach my $file (sort keys %$dist_files) {
next if $file =~ m{^MYMETA\.}; # Double check that we skip MYMETA.*
my $new = $self->copy_if_modified(from => $file, to_dir => $dist_dir, verbose => 0);
}
$self->do_create_bundle_inc if @{$self->bundle_inc};
$self->_sign_dir($dist_dir) if $self->{properties}{sign};
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
warn "'Argument list' was 'too long', env lengths are $env_entries";
}
return !$status;
}
sub copy_if_modified {
my $self = shift;
my %args = (@_ > 3
? ( @_ )
: ( from => shift, to_dir => shift, flatten => shift )
);
$args{verbose} = !$self->quiet
unless exists $args{verbose};
my $file = $args{from};
unless (defined $file and length $file) {
die "No 'from' parameter given to copy_if_modified";
}
# makes no sense to replicate an absolute path, so assume flatten
$args{flatten} = 1 if File::Spec->file_name_is_absolute( $file );
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
} elsif (defined $args{to_dir} and length $args{to_dir}) {
$to_path = File::Spec->catfile( $args{to_dir}, $args{flatten}
? File::Basename::basename($file)
: $file );
} else {
die "No 'to' or 'to_dir' parameter given to copy_if_modified";
}
return if $self->up_to_date($file, $to_path); # Already fresh
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Base/ModuleBuild.pm view on Meta::CPAN
$self->config_data( 'finished_installing' => 1 );
if ( $self->notes( 'alien_blib_scheme') || $self->alien_stage_install) {
### TODO: empty if should be claned up before 0.017.
### we used to call process_files_by_extension('pm')
### here, but with gh#121 it is unecessary
## reinstall config_data to blib
#$self->process_files_by_extension('pm');
} else {
# to refresh config_data
$self->SUPER::ACTION_config_data;
view all matches for this distribution
view release on metacpan or search on metacpan
0.000_021 Jul 25, 2012
- Some fixes for Mac, not sure its working yet
0.000_020 Jun 22, 2012
- Windows now passes the test suite (another cleanup error trapped)
- Begin overloading copy_if_modified for relocalizing dylibs on mac
(this is not working yet, this release is for windows testers)
0.000_019 Jun 21, 2012
- REALLY return to EU::LibBuilder (sorry for the noise)
view all matches for this distribution
view release on metacpan or search on metacpan
Changes.Alien-Base view on Meta::CPAN
0.000_021 Jul 25, 2012
- Some fixes for Mac, not sure its working yet
0.000_020 Jun 22, 2012
- Windows now passes the test suite (another cleanup error trapped)
- Begin overloading copy_if_modified for relocalizing dylibs on mac
(this is not working yet, this release is for windows testers)
0.000_019 Jun 21, 2012
- REALLY return to EU::LibBuilder (sorry for the noise)
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Build/AlienLibJIT.pm view on Meta::CPAN
qw(libjit lib),
File::Basename::basename($LIBJIT_RESULT)
);
foreach my $from (keys %$libjit_files) {
my $to = File::Spec->catdir(qw(blib arch auto Alien LibJIT), $libjit_files->{$from});
$self->copy_if_modified(from => $from, to => $to);
}
return 1;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
$self->autosplit_file($_, $blib) for ref($split) ? @$split : ($split);
}
foreach my $element (@{$self->build_elements}) {
my $method = "process_${element}_files";
$method = "process_files_by_extension" unless $self->can($method);
$self->$method($element);
}
$self->depends_on('config_data');
}
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
$self->log_info("Building " . $self->dist_name . "\n");
$self->depends_on('code');
$self->depends_on('docs');
}
sub process_files_by_extension {
my ($self, $ext) = @_;
my $method = "find_${ext}_files";
my $files = $self->can($method) ? $self->$method() : $self->_find_file_by_type($ext, 'lib');
while (my ($file, $dest) = each %$files) {
$self->copy_if_modified(from => $file, to => File::Spec->catfile($self->blib, $dest) );
}
}
sub process_support_files {
my $self = shift;
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
# root for all File::ShareDir paths
my $share_prefix = File::Spec->catdir($self->blib, qw/lib auto share/);
# copy all share files to blib
while (my ($file, $dest) = each %$files) {
$self->copy_if_modified(
from => $file, to => File::Spec->catfile( $share_prefix, $dest )
);
}
}
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
my $self = shift;
my $files = $self->find_xs_files;
while (my ($from, $to) = each %$files) {
unless ($from eq $to) {
$self->add_to_cleanup($to);
$self->copy_if_modified( from => $from, to => $to );
}
$self->process_xs($to);
}
}
sub process_pod_files { shift()->process_files_by_extension(shift()) }
sub process_pm_files { shift()->process_files_by_extension(shift()) }
sub process_script_files {
my $self = shift;
my $files = $self->find_script_files;
return unless keys %$files;
my $script_dir = File::Spec->catdir($self->blib, 'script');
File::Path::mkpath( $script_dir );
foreach my $file (keys %$files) {
my $result = $self->copy_if_modified($file, $script_dir, 'flatten') or next;
$self->fix_shebang_line($result) unless $self->is_vmsish;
$self->make_executable($result);
}
}
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
File::Spec->rel2abs( $dir ) );
my $to_file =
File::Spec->catfile( $ppm, 'blib',
exists( $types{$type} ) ? $types{$type} : $type,
$rel_file );
$self->copy_if_modified( from => $file, to => $to_file );
}
}
foreach my $type ( qw(bin lib) ) {
$self->htmlify_pods( $type, File::Spec->catdir($ppm, 'blib', 'html') );
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
$self->log_info("Creating $dist_dir\n");
$self->add_to_cleanup($dist_dir);
foreach my $file (keys %$dist_files) {
next if $file =~ m{^MYMETA\.}; # Double check that we skip MYMETA.*
my $new = $self->copy_if_modified(from => $file, to_dir => $dist_dir, verbose => 0);
}
$self->do_create_bundle_inc if @{$self->bundle_inc};
$self->_sign_dir($dist_dir) if $self->{properties}{sign};
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
warn "'Argument list' was 'too long', env lengths are $env_entries";
}
return !$status;
}
sub copy_if_modified {
my $self = shift;
my %args = (@_ > 3
? ( @_ )
: ( from => shift, to_dir => shift, flatten => shift )
);
$args{verbose} = !$self->quiet
unless exists $args{verbose};
my $file = $args{from};
unless (defined $file and length $file) {
die "No 'from' parameter given to copy_if_modified";
}
# makes no sense to replicate an absolute path, so assume flatten
$args{flatten} = 1 if File::Spec->file_name_is_absolute( $file );
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
} elsif (defined $args{to_dir} and length $args{to_dir}) {
$to_path = File::Spec->catfile( $args{to_dir}, $args{flatten}
? File::Basename::basename($file)
: $file );
} else {
die "No 'to' or 'to_dir' parameter given to copy_if_modified";
}
return if $self->up_to_date($file, $to_path); # Already fresh
{
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Module/Build.pm view on Meta::CPAN
=cut
sub process_pm_files {
no warnings "once";
local *copy_if_modified = \*process_pm_file_if_modified;
my $self = shift;
return $self->SUPER::process_pm_files(@_);
}
=item I<process_pm_file_if_modified(%args)>
view all matches for this distribution
view release on metacpan or search on metacpan
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
$self->autosplit_file($_, $blib) for ref($split) ? @$split : ($split);
}
foreach my $element (@{$self->build_elements}) {
my $method = "process_${element}_files";
$method = "process_files_by_extension" unless $self->can($method);
$self->$method($element);
}
$self->depends_on('config_data');
}
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
$self->log_info("Building " . $self->dist_name . "\n");
$self->depends_on('code');
$self->depends_on('docs');
}
sub process_files_by_extension {
my ($self, $ext) = @_;
my $method = "find_${ext}_files";
my $files = $self->can($method) ? $self->$method() : $self->_find_file_by_type($ext, 'lib');
while (my ($file, $dest) = each %$files) {
$self->copy_if_modified(from => $file, to => File::Spec->catfile($self->blib, $dest) );
}
}
sub process_support_files {
my $self = shift;
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
# root for all File::ShareDir paths
my $share_prefix = File::Spec->catdir($self->blib, qw/lib auto share/);
# copy all share files to blib
while (my ($file, $dest) = each %$files) {
$self->copy_if_modified(
from => $file, to => File::Spec->catfile( $share_prefix, $dest )
);
}
}
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
my $self = shift;
my $files = $self->find_xs_files;
while (my ($from, $to) = each %$files) {
unless ($from eq $to) {
$self->add_to_cleanup($to);
$self->copy_if_modified( from => $from, to => $to );
}
$self->process_xs($to);
}
}
sub process_pod_files { shift()->process_files_by_extension(shift()) }
sub process_pm_files { shift()->process_files_by_extension(shift()) }
sub process_script_files {
my $self = shift;
my $files = $self->find_script_files;
return unless keys %$files;
my $script_dir = File::Spec->catdir($self->blib, 'script');
File::Path::mkpath( $script_dir );
foreach my $file (keys %$files) {
my $result = $self->copy_if_modified($file, $script_dir, 'flatten') or next;
$self->fix_shebang_line($result) unless $self->is_vmsish;
$self->make_executable($result);
}
}
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
File::Spec->rel2abs( $dir ) );
my $to_file =
File::Spec->catfile( $ppm, 'blib',
exists( $types{$type} ) ? $types{$type} : $type,
$rel_file );
$self->copy_if_modified( from => $file, to => $to_file );
}
}
foreach my $type ( qw(bin lib) ) {
local $self->{properties}{html_css} = 'Active.css';
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
$self->delete_filetree($dist_dir);
$self->log_info("Creating $dist_dir\n");
$self->add_to_cleanup($dist_dir);
foreach my $file (keys %$dist_files) {
my $new = $self->copy_if_modified(from => $file, to_dir => $dist_dir, verbose => 0);
}
$self->do_create_bundle_inc if @{$self->bundle_inc};
$self->_sign_dir($dist_dir) if $self->{properties}{sign};
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
warn "'Argument list' was 'too long', env lengths are $env_entries";
}
return !$status;
}
sub copy_if_modified {
my $self = shift;
my %args = (@_ > 3
? ( @_ )
: ( from => shift, to_dir => shift, flatten => shift )
);
$args{verbose} = !$self->quiet
unless exists $args{verbose};
my $file = $args{from};
unless (defined $file and length $file) {
die "No 'from' parameter given to copy_if_modified";
}
# makes no sense to replicate an absolute path, so assume flatten
$args{flatten} = 1 if File::Spec->file_name_is_absolute( $file );
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
} elsif (defined $args{to_dir} and length $args{to_dir}) {
$to_path = File::Spec->catfile( $args{to_dir}, $args{flatten}
? File::Basename::basename($file)
: $file );
} else {
die "No 'to' or 'to_dir' parameter given to copy_if_modified";
}
return if $self->up_to_date($file, $to_path); # Already fresh
{
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Build/Win32.pm view on Meta::CPAN
my $self = shift;
my %files = $self->files_to_install;
while( my( $from, $to ) = each %files ) {
$to =~ s/rEpLaCe/$self->{awx_key}/g;
$self->copy_if_modified( from => $from, to => $to, verbose => 1 );
}
}
sub install_wxwidgets {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Alzabo/GUI/Mason/Build.pm view on Meta::CPAN
{
my $to_f = File::Spec->catfile( $to, $from_f );
$to_f =~ s/\.mhtml$/$ext/;
my $target =
$self->copy_if_modified( from => File::Spec->catfile( $from, $from_f ),
to => $to_f,
);
# was up to date
next unless $target;
view all matches for this distribution
view release on metacpan or search on metacpan
share/flavor/Minimum/builder/MyBuilder.pm view on Meta::CPAN
my $share_prefix = File::Spec->catdir($self->blib, qw/lib auto share dist/, '<% $dist %>');
for my $dir (qw(tmpl static)) {
next unless -d $dir;
for my $src (@{$self->rscan_dir($dir)}) {
next if -d $src;
$self->copy_if_modified(
from => $src,
to_dir => File::Spec->catfile( $share_prefix )
);
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
# Run a find under each $dir for normal, non-CVS files
foreach $dir (@dirs) { File::Find::find({wanted => $mat}, $dir); }
# Copy into ./bdir
foreach (@found) {
$self->copy_if_modified(from => $_, to => "blib/" . $_);
}
}
EOF
my $builder = $class->new(
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Build.pm view on Meta::CPAN
File::Path::mkpath($path);
$files = $self->_find_all_files($dir);
my ($should_be_executable);
while (my ($file, $dest) = each %$files) {
$target_file = File::Spec->catfile($blib, $dest);
$result = $self->copy_if_modified(from => $file, to => $target_file) || "";
if ($result && $contains_executables) {
$self->fix_shebang_line($result);
$self->make_executable($result)
if $self->_should_be_executable($result);
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Module/Build.pm view on Meta::CPAN
=cut
sub process_pm_files {
no warnings "once";
local *copy_if_modified = \*process_pm_file_if_modified;
my $self = shift;
return $self->SUPER::process_pm_files(@_);
}
=item I<process_pm_file_if_modified(%args)>
view all matches for this distribution
view release on metacpan or search on metacpan
my @scripts;
for my $bin (@files) {
my $script = "$to_dir/$bin";
push @scripts, $self->localize_file_path($script);
my $orig = $self->localize_file_path("t/bin/$bin");
$self->copy_if_modified(
from => $orig,
to_dir => $to_dir,
flatten => 1,
);
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Build/My.pm view on Meta::CPAN
# Replace *.pl files with ones without suffix
sub process_script_files {
my $self = shift;
local *copy_if_modified = sub {
my $self = shift;
my %args = (@_ > 3 ? (@_) : (from => shift, to_dir => shift, flatten => shift));
# Only for script/*.pl files
if ($args{from} =~ /\bscript\/.*\.pl$/ and $args{to_dir}) {
my (undef, undef, $file) = File::Spec->splitpath($args{from});
$file =~ s/\.pl$//;
$args{to} = File::Spec->catfile($args{to_dir}, $file);
delete $args{to_dir};
return $self->SUPER::copy_if_modified(%args);
}
return $self->SUPER::copy_if_modified(%args);
};
$self->SUPER::process_script_files;
}
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
$self->autosplit_file($_, $blib) for ref($split) ? @$split : ($split);
}
foreach my $element (@{$self->build_elements}) {
my $method = "process_${element}_files";
$method = "process_files_by_extension" unless $self->can($method);
$self->$method($element);
}
$self->depends_on('config_data');
}
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
$self->log_info("Building " . $self->dist_name . "\n");
$self->depends_on('code');
$self->depends_on('docs');
}
sub process_files_by_extension {
my ($self, $ext) = @_;
my $method = "find_${ext}_files";
my $files = $self->can($method) ? $self->$method() : $self->_find_file_by_type($ext, 'lib');
foreach my $file (sort keys %$files) {
$self->copy_if_modified(from => $file, to => File::Spec->catfile($self->blib, $files->{$file}) );
}
}
sub process_support_files {
my $self = shift;
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
# root for all File::ShareDir paths
my $share_prefix = File::Spec->catdir($self->blib, qw/lib auto share/);
# copy all share files to blib
foreach my $file (sort keys %$files) {
$self->copy_if_modified(
from => $file, to => File::Spec->catfile( $share_prefix, $files->{$file} )
);
}
}
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
croak 'Can\'t build xs files under --pureperl-only' if %$files && $self->pureperl_only;
foreach my $from (sort keys %$files) {
my $to = $files->{$from};
unless ($from eq $to) {
$self->add_to_cleanup($to);
$self->copy_if_modified( from => $from, to => $to );
}
$self->process_xs($to);
}
}
sub process_pod_files { shift()->process_files_by_extension(shift()) }
sub process_pm_files { shift()->process_files_by_extension(shift()) }
sub process_script_files {
my $self = shift;
my $files = $self->find_script_files;
return unless keys %$files;
my $script_dir = File::Spec->catdir($self->blib, 'script');
File::Path::mkpath( $script_dir );
foreach my $file (sort keys %$files) {
my $result = $self->copy_if_modified($file, $script_dir, 'flatten') or next;
$self->fix_shebang_line($result) unless $self->is_vmsish;
$self->make_executable($result);
}
}
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
File::Spec->rel2abs( $dir ) );
my $to_file =
File::Spec->catfile( $ppm, 'blib',
exists( $types{$type} ) ? $types{$type} : $type,
$rel_file );
$self->copy_if_modified( from => $file, to => $to_file );
}
}
foreach my $type ( qw(bin lib) ) {
$self->htmlify_pods( $type, File::Spec->catdir($ppm, 'blib', 'html') );
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
$self->log_info("Creating $dist_dir\n");
$self->add_to_cleanup($dist_dir);
foreach my $file (sort keys %$dist_files) {
next if $file =~ m{^MYMETA\.}; # Double check that we skip MYMETA.*
my $new = $self->copy_if_modified(from => $file, to_dir => $dist_dir, verbose => 0);
}
$self->do_create_bundle_inc if @{$self->bundle_inc};
$self->_sign_dir($dist_dir) if $self->{properties}{sign};
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
warn "'Argument list' was 'too long', env lengths are $env_entries";
}
return !$status;
}
sub copy_if_modified {
my $self = shift;
my %args = (@_ > 3
? ( @_ )
: ( from => shift, to_dir => shift, flatten => shift )
);
$args{verbose} = !$self->quiet
unless exists $args{verbose};
my $file = $args{from};
unless (defined $file and length $file) {
die "No 'from' parameter given to copy_if_modified";
}
# makes no sense to replicate an absolute path, so assume flatten
$args{flatten} = 1 if File::Spec->file_name_is_absolute( $file );
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
} elsif (defined $args{to_dir} and length $args{to_dir}) {
$to_path = File::Spec->catfile( $args{to_dir}, $args{flatten}
? File::Basename::basename($file)
: $file );
} else {
die "No 'to' or 'to_dir' parameter given to copy_if_modified";
}
return if $self->up_to_date($file, $to_path); # Already fresh
{
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Build/Sqitch.pm view on Meta::CPAN
&& -e File::Spec->catfile($etc, 'templates', "$segs[1].tmpl")
) ) {
$dest .= '.default';
}
$self->copy_if_modified(
from => $file,
to => File::Spec->catfile( $self->blib, $dest )
);
}
}
inc/Module/Build/Sqitch.pm view on Meta::CPAN
my $self = shift;
# XXX Switch to lib/perl5.
my $bin = $self->install_destination('script');
my $script = File::Spec->catfile(qw(bin sqitch));
my $dest = File::Spec->catfile($bin, 'sqitch');
my $result = $self->copy_if_modified($script, $bin, 'flatten') or return;
$self->fix_shebang_line($result) unless $self->is_vmsish;
$self->_set_findbin($result);
$self->make_executable($result);
}
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
$self->autosplit_file($_, $blib) for ref($split) ? @$split : ($split);
}
foreach my $element (@{$self->build_elements}) {
my $method = "process_${element}_files";
$method = "process_files_by_extension" unless $self->can($method);
$self->$method($element);
}
$self->depends_on('config_data');
}
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
$self->log_info("Building " . $self->dist_name . "\n");
$self->depends_on('code');
$self->depends_on('docs');
}
sub process_files_by_extension {
my ($self, $ext) = @_;
my $method = "find_${ext}_files";
my $files = $self->can($method) ? $self->$method() : $self->_find_file_by_type($ext, 'lib');
while (my ($file, $dest) = each %$files) {
$self->copy_if_modified(from => $file, to => File::Spec->catfile($self->blib, $dest) );
}
}
sub process_support_files {
my $self = shift;
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
# root for all File::ShareDir paths
my $share_prefix = File::Spec->catdir($self->blib, qw/lib auto share/);
# copy all share files to blib
while (my ($file, $dest) = each %$files) {
$self->copy_if_modified(
from => $file, to => File::Spec->catfile( $share_prefix, $dest )
);
}
}
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
my $files = $self->find_xs_files;
croak 'Can\'t build xs files under --pureperl-only' if %$files && $self->pureperl_only;
while (my ($from, $to) = each %$files) {
unless ($from eq $to) {
$self->add_to_cleanup($to);
$self->copy_if_modified( from => $from, to => $to );
}
$self->process_xs($to);
}
}
sub process_pod_files { shift()->process_files_by_extension(shift()) }
sub process_pm_files { shift()->process_files_by_extension(shift()) }
sub process_script_files {
my $self = shift;
my $files = $self->find_script_files;
return unless keys %$files;
my $script_dir = File::Spec->catdir($self->blib, 'script');
File::Path::mkpath( $script_dir );
foreach my $file (keys %$files) {
my $result = $self->copy_if_modified($file, $script_dir, 'flatten') or next;
$self->fix_shebang_line($result) unless $self->is_vmsish;
$self->make_executable($result);
}
}
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
File::Spec->rel2abs( $dir ) );
my $to_file =
File::Spec->catfile( $ppm, 'blib',
exists( $types{$type} ) ? $types{$type} : $type,
$rel_file );
$self->copy_if_modified( from => $file, to => $to_file );
}
}
foreach my $type ( qw(bin lib) ) {
$self->htmlify_pods( $type, File::Spec->catdir($ppm, 'blib', 'html') );
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
$self->log_info("Creating $dist_dir\n");
$self->add_to_cleanup($dist_dir);
foreach my $file (keys %$dist_files) {
next if $file =~ m{^MYMETA\.}; # Double check that we skip MYMETA.*
my $new = $self->copy_if_modified(from => $file, to_dir => $dist_dir, verbose => 0);
}
$self->do_create_bundle_inc if @{$self->bundle_inc};
$self->_sign_dir($dist_dir) if $self->{properties}{sign};
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
warn "'Argument list' was 'too long', env lengths are $env_entries";
}
return !$status;
}
sub copy_if_modified {
my $self = shift;
my %args = (@_ > 3
? ( @_ )
: ( from => shift, to_dir => shift, flatten => shift )
);
$args{verbose} = !$self->quiet
unless exists $args{verbose};
my $file = $args{from};
unless (defined $file and length $file) {
die "No 'from' parameter given to copy_if_modified";
}
# makes no sense to replicate an absolute path, so assume flatten
$args{flatten} = 1 if File::Spec->file_name_is_absolute( $file );
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
} elsif (defined $args{to_dir} and length $args{to_dir}) {
$to_path = File::Spec->catfile( $args{to_dir}, $args{flatten}
? File::Basename::basename($file)
: $file );
} else {
die "No 'to' or 'to_dir' parameter given to copy_if_modified";
}
return if $self->up_to_date($file, $to_path); # Already fresh
{
view all matches for this distribution
view release on metacpan or search on metacpan
mimi.fatpack view on Meta::CPAN
$fatpacked{"Module/Build.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MODULE_BUILD';
package Module::Build;use if $] >= 5.019,'deprecate';use 5.006;use strict;use warnings;use File::Spec ();use File::Path ();use File::Basename ();use Perl::OSType ();use Module::Build::Base;our@ISA=qw(Module::Build::Base);our$VERSION='0.03';$VERSION...
MODULE_BUILD
$fatpacked{"Module/Build/Base.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MODULE_BUILD_BASE';
package Module::Build::Base;use 5.006;use strict;use warnings;our$VERSION='0.03';$VERSION=eval$VERSION;use Carp;use Cwd ();use File::Copy ();use File::Find ();use File::Path ();use File::Basename ();use File::Spec 0.82 ();use File::Compare ();use M...
ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions
of the modules indicated above before proceeding with this installation
EOF
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Build/My.pm view on Meta::CPAN
# Replace *.sh files with ones without suffix
sub process_script_files {
my $self = shift;
local *copy_if_modified = sub {
my $self = shift;
my %args = (@_ > 3 ? ( @_ ) : ( from => shift, to_dir => shift, flatten => shift ) );
# Only for script/*.sh files
if ($args{from} =~ /\bscript\/.*\.sh$/ and $args{to_dir}) {
my (undef, undef, $file) = File::Spec->splitpath($args{from});
$file =~ s/\.sh$//;
$args{to} = File::Spec->catfile($args{to_dir}, $file);
delete $args{to_dir};
return $self->SUPER::copy_if_modified(%args);
};
return $self->SUPER::copy_if_modified(%args);
};
$self->SUPER::process_script_files;
};
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Build/My.pm view on Meta::CPAN
# Replace *.pl files with ones without suffix
sub process_script_files {
my $self = shift;
local *copy_if_modified = sub {
my $self = shift;
my %args = (@_ > 3 ? ( @_ ) : ( from => shift, to_dir => shift, flatten => shift ) );
# Only for script/*.pl files
if ($args{from} =~ /\bscript\/.*\.pl$/ and $args{to_dir}) {
my (undef, undef, $file) = File::Spec->splitpath($args{from});
$file =~ s/\.pl$//;
$args{to} = File::Spec->catfile($args{to_dir}, $file);
delete $args{to_dir};
return $self->SUPER::copy_if_modified(%args);
};
return $self->SUPER::copy_if_modified(%args);
};
$self->SUPER::process_script_files;
};
view all matches for this distribution
view release on metacpan or search on metacpan
my $props = $self->{properties};
my $files = $props->{tentmaker_files};
my $path = $self->notes( 'tentmaker_template_path' );
foreach my $file ( @{ $files } ) {
$self->copy_if_modified( $file, $path );
}
print "installed tentmaker templates to $path\n";
}
sub ACTION_dist {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
install_util/BioStudioInstall.pm view on Meta::CPAN
my $conf_dir = File::Spec->catdir($BSB->blib, 'BioStudio');
File::Path::mkpath( $conf_dir );
foreach my $file (@{$files})
{
my $result = $BSB->copy_if_modified($file, $conf_dir) or next;
$BSB->fix_shebang_line($result) unless $BSB->is_vmsish;
}
}
sub process_gbrowse_files
install_util/BioStudioInstall.pm view on Meta::CPAN
my $gbrowse_dir = File::Spec->catdir($BSB->blib, 'gbrowse_plugins');
File::Path::mkpath( $gbrowse_dir );
foreach my $file (@{$files})
{
my $result = $BSB->copy_if_modified($file, $gbrowse_dir, 'flatten') or next;
$BSB->fix_shebang_line($result) unless $BSB->is_vmsish;
$BSB->make_executable($result);
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
my $conf_dir = File::Spec->catdir($build->blib, 'GeneDesign');
File::Path::mkpath( $conf_dir );
foreach my $file (@{$files})
{
my $result = $build->copy_if_modified($file, $conf_dir) or next;
$build->fix_shebang_line($result) unless $build->is_vmsish;
}
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
chomp(my \$nmake = `which nmake`);
\$make ||= \$nmake;
system "cd c_bin; \$make INCLUDES=-I$sam_include LIBPATH=-L$sam_lib";
mkdir "blib/bin" unless -e "blib/bin";
my \@exec = grep {-x \$_} <c_bin/*>;
\$self->copy_if_modified(from =>\$_,
to_dir => "./blib/bin/",
flatten=>1,
) foreach \@exec;
}
view all matches for this distribution
view release on metacpan or search on metacpan
my @tobp;
while (my ($file, $dest) = each %$files) {
$dest = 'bp_'.File::Basename::basename($dest);
$dest = File::Spec->catfile($script_build, $dest);
$build->copy_if_modified(from => $file, to => $dest);
push @tobp, $dest;
}
$build->script_files(\@tobp);
}
view all matches for this distribution
view release on metacpan or search on metacpan
my @tobp;
while (my ($file, $dest) = each %$files) {
$dest = 'bp_'.File::Basename::basename($dest);
$dest =~ s/PLS$/pl/;
$dest = File::Spec->catfile($script_build, $dest);
$build->copy_if_modified(from => $file, to => $dest);
push @tobp, $dest;
}
$build->script_files(\@tobp);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Buscador/Build.pm view on Meta::CPAN
my @files = $self->_find_extras;
print "installing extras to $path\n";
for (@files) {
$FAKE
? print "$_ -> $path/$_ (FAKE)\n"
: $self->copy_if_modified($_, $path);
}
}
sub ACTION_cover {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
CAF_MB_Installer.pm view on Meta::CPAN
return 1 if $ext eq 'caf_image';
return 1 if $ext eq 'caf_server';
return;
}
sub process_files_by_extension {
my $self = shift;
my ($ext) = @_;
# skip special processing for non-caf
unless ($ext =~ /^caf_/) {
return $self->SUPER::process_files_by_extension(@_);
}
my $method = "find_${ext}_files";
my $files = $self->can($method) ? $self->$method() : $self->_find_file_by_type($ext, 'lib');
CAF_MB_Installer.pm view on Meta::CPAN
return if $self->up_to_date($source, $target);
# caf_images and caf_project are a simple copy
if ($self->caf_type_is_static($ext)) {
$self->copy_if_modified(from => $source, to => $target);
}
else {
# Make parent directory
File::Path::mkpath(File::Basename::dirname($target), 0, 0777);
view all matches for this distribution