CPANPLUS

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN


### no setup? this is easy.. print the message and move a long
unless( $RunSetup ) {
    print qq[
### IMPORTANT! ######################################################


As of CPANPLUS 0.070, configuration during 'perl Makefile.PL'
is no longer required. A default config is now shipped that
should work out of the box on most machines, for priviliged
and unprivileged users.

If you wish to configure CPANPLUS to your environment, you can
either do that from the interactive shell after installation:

    \$ cpanp
    CPAN Terminal> s reconfigure

Or you can invoke this program as follows, to do it now:

    \$ $^X Makefile.PL --setup

This also means that any config created by any CPANPLUS older
than 0.070 will no longer work, and you are required to
reconfigure. See the ChangeLog file for details.

We appologize for the inconvenience.
    ] . $/;

### ok, we're asked to run the setup stuff, let's do it
} else {

    my $setup = CPANPLUS::Configure::Setup->new(
                    backend             => $Backend,
                    configure_object    => $Config,
                );

    $setup->init;
}

{   print loc("
### PLEASE NOTE ###################################################

CPANPLUS also ships a 'boxed' cpanp client, so you can run it
out of it's extraction dir, by typing:

    \$ perl bin/cpanp-boxed

This may help you with bootstrap issues, or other situations
where you need to use CPANPLUS but can not use a system installation.

You can install all of CPANPLUS' dependencies like this, before
installing CPANPLUS itself by running:

    \$ perl bin/cpanp-boxed -s selfupdate dependencies

All the modules bundled are found in the 'inc/bundle' directory. If
you, for whatever reason, wish to not install these from cpan, you
could include them into your environment as such (using tcsh):

    \$ setenv PERL5LIB $FindBin::Bin/inc/bundle

###################################################################

    " );
    print "\n";
}

_check_site_bin();

### toss out the old source files, they might be compiled
### in an incompatilbe format (rt #18121)
### use 'can', because it might be  different backend now
{   my $pat = File::Spec->catfile(
                    $Config->get_conf('base'),
                    $Config->_get_source('stored') .'*'. STORABLE_EXT,
                );

    for my $file( glob($pat) ) {
        1 while $file && unlink $file;
    }
}

### write the makefile.pl
{   my $su      = $Backend->selfupdate_object;
    my %prereq  = ( %{ $su->list_core_dependencies( 'AS_HASH' ) },
                    map { ### might not need anything -- make sure we
                          ### place an empty hash ref there
                          %{ $su->modules_for_feature( $_, 'AS_HASH' ) || {} }
                    } $su->list_enabled_features
                );

    my $buildclean;
    if ( $prereq{'CPANPLUS::Dist::Build'} ) {
      delete $prereq{'CPANPLUS::Dist::Build'};
      $prereq{'Module::Build'} = '0.32';
      require File::Path; require File::Copy;
      File::Path::mkpath( File::Spec->catdir(qw[lib CPANPLUS Dist Build]) ) or die "$!\n";
      File::Copy::copy( File::Spec->catfile('bundled', 'Build.pm'), File::Spec->catfile(qw[lib CPANPLUS Dist], 'Build.pm') );
      File::Copy::copy( File::Spec->catfile('bundled', 'Constants.pm'), File::Spec->catfile(qw[lib CPANPLUS Dist Build], 'Constants.pm' ) );
      $buildclean = ' lib/CPANPLUS/Dist/Build*';
    }

    my @scripts = _scripts();
    my $extraclean .= join ' ', grep { /\d$/ } @scripts;

    ### restore the original @INC, so proper probing of missing
    ### prereqs can be done
    @INC = @ORIG_INC;
    name            ('CPANPLUS');
    author          ('Jos Boumans <kane@cpan.org>');
    abstract        ('Ameliorated interface to the CPAN');
    version_from    ('lib/CPANPLUS/Internals.pm');
    license         ('perl');
    no_index        ( directory => 'bundled' );
    installdirs     ( $] >= 5.009005 && $] < 5.012 ? 'perl' : 'site' ),
    install_script  ($_) for @scripts;
    #install_script  ($_) for grep { $_ !~ /cpanp-boxed/ } glob('bin/*');
    requires        (%prereq);
    makemaker_args  ( test => { TESTS => $Tests } ) if $Tests;
    makemaker_args  ( clean => { FILES =>



( run in 0.443 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )