Acme-Perl-Consensual

 view release on metacpan or  search on metacpan

inc/Module/AutoInstall.pm  view on Meta::CPAN

256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
        my $make = $Config::Config{make};
        if ($InstallDepsTarget) {
            print
"*** To install dependencies type '$make installdeps' or '$make installdeps_notest'.\n";
        }
        else {
            print
"*** Dependencies will be installed the next time you type '$make'.\n";
        }
 
        # make an educated guess of whether we'll need root permission.
        print "    (You may need to do that as the 'root' user.)\n"
          if eval '$>';
    }
    print "*** $class configuration finished.\n";
 
    chdir $cwd;
 
    # import to main::
    no strict 'refs';
    *{'main::WriteMakefile'} = \&Write if caller(0) eq 'main';

inc/Module/AutoInstall.pm  view on Meta::CPAN

599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
sub _has_cpanplus {
    return (
        $HasCPANPLUS = (
            $INC{'CPANPLUS/Config.pm'}
              or _load('CPANPLUS::Shell::Default')
        )
    );
}
 
# make guesses on whether we're under the CPAN installation directory
sub _under_cpan {
    require Cwd;
    require File::Spec;
 
    my $cwd  = File::Spec->canonpath( Cwd::cwd() );
    my $cpan = File::Spec->canonpath( $CPAN::Config->{cpan_home} );
 
    return ( index( $cwd, $cpan ) > -1 );
}

inc/Module/Install/Package.pm  view on Meta::CPAN

259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
    my ($self) = @_;
}
 
sub _final {
    my ($self) = @_;
}
 
1;
 
#-----------------------------------------------------------------------------#
# Take a guess at the primary .pm and .pod files for 'all_from', and friends.
# Put them in global magical vars in the main:: namespace.
#-----------------------------------------------------------------------------#
use overload '""' => sub {
    $_[0]->guess_pm unless @{$_[0]};
    return $_[0]->[0];
};
sub set { $_[0]->[0] = $_[1] }
sub guess_pm {
    my $pm = '';
    my $self = shift;
    if (-e 'META.yml') {
        open META, 'META.yml' or die "Can't open 'META.yml' for input:\n$!";
        my $meta = do { local $/; <META> };
        close META;
        $meta =~ /^module_name: (\S+)$/m
            or die "Can't get module_name from META.yml";
        $pm = $1;
        $pm =~ s!::!/!g;

inc/Module/Install/Package.pm  view on Meta::CPAN

292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
        require File::Find;
        my @array = ();
        File::Find::find(sub {
            return unless /\.pm$/;
            my $name = $File::Find::name;
            my $num = ($name =~ s!/+!/!g);
            my $ary = $array[$num] ||= [];
            push @$ary, $name;
        }, 'lib');
        shift @array while @array and not defined $array[0];
        die "Can't guess main module" unless @array;
        (($pm) = sort @{$array[0]}) or
            die "Can't guess main module";
    }
    my $pmc = $pm . 'c';
    $pm = $pmc if -e $pmc;
    $self->set($pm);
}
$main::PM = bless [$main::PM ? ($main::PM) : ()], __PACKAGE__;
 
use overload '""' => sub {
    return $_[0]->[0] if @{$_[0]};



( run in 0.309 second using v1.01-cache-2.11-cpan-cba739cd03b )