Perl-Dist
view release on metacpan or search on metacpan
lib/Perl/Dist/Vanilla.pm view on Meta::CPAN
shift->SUPER::binary_file(@_);
}
#####################################################################
# Configuration
# Apply some default paths
sub new {
my $class = shift;
# Prepend defaults
my $self = $class->SUPER::new(
app_id => 'vanillaperl',
app_name => 'Vanilla Perl',
app_publisher => 'Vanilla Perl Project',
app_publisher_url => 'http://vanillaperl.org/',
image_dir => 'C:\\vanilla',
# Always generate both forms
exe => 1,
zip => 1,
@_,
);
return $self;
}
# Lazily default the full name
sub app_ver_name {
$_[0]->{app_ver_name} or
$_[0]->app_name
. ($_[0]->portable ? ' Portable' : '')
. ' ' . $_[0]->perl_version_human
. ' Build ' . $_[0]->VERSION;
}
# Lazily default the file name
sub output_base_filename {
$_[0]->{output_base_filename} or
'vanilla-perl'
. ($_[0]->portable ? '-portable' : '')
. '-' . $_[0]->perl_version_human
. '-build-' . $_[0]->VERSION;
}
#####################################################################
# Installation Script
sub install_perl_5100_bin {
my $self = shift;
$self->SUPER::install_perl_5100_bin(@_);
# Overwrite the CPAN config to be relocatable
if ( $self->portable ) {
$self->install_file(
share => 'Perl-Dist vanilla/perl-5.10.0/lib/Config.pm',
install_to => 'perl/lib/Config.pm',
);
$self->install_file(
share => 'Perl-Dist vanilla/perl-5.10.0/lib/Config_heavy.pl',
install_to => 'perl/lib/Config_heavy.pl',
);
$self->install_file(
share => 'Perl-Dist vanilla/perl-5.10.0/lib/CPAN/Config.pm',
install_to => 'perl/lib/CPAN/Config.pm',
);
}
return 1;
}
sub install_c_libraries {
my $self = shift;
$self->SUPER::install_c_libraries(@_);
# Install Expat (which exercises install_par)
$self->install_expat;
return 1;
}
sub install_perl_modules {
my $self = shift;
$self->SUPER::install_perl_modules(@_);
# Upgrade to the latest version
$self->install_module(
name => 'CGI',
);
return 1;
}
# Delete from additional compiler stuff for non-Microsoft platforms
sub remove_waste {
my $self = shift;
$self->SUPER::remove_waste(@_);
$self->trace("Removing unneeded compiler templates...\n");
foreach my $dir (
[ qw{ c bin startup mac } ],
[ qw{ c bin startup os2 } ],
[ qw{ c bin startup unix } ],
[ qw{ c bin startup templates mac } ],
[ qw{ c bin startup templates os2 } ],
[ qw{ c bin startup templates unix } ],
) {
File::Remove::remove( \1, $self->dir(@$dir) );
}
return 1;
}
( run in 1.734 second using v1.01-cache-2.11-cpan-71847e10f99 )