in reply to Re: Asking a question in Makefile.PL
in thread Asking a question in Makefile.PL
NO, please don't invoke CPAN in Makefile.PL
It is extremely bad practice. It plays havoc with CPANPLUS based CPAN tester rigs ( like mine ), and for people who don't use CPAN but use CPANPLUS for installing modules.
Update
The best way is to just let CPAN/CPANPLUS deal with installing the module for you as a prereq.
use ExtUtils::MakeMaker; my %prereqs = ( "Blah::Blah" => 0, "Foo::Bar" => 1.0, ); eval{require Some::Module}; if ($@) { my $reply = prompt("Some::Module not installed. Install (Y/n)", "Y +"); $prereqs{"Some::Module"} = 0 unless $reply =~ m/n/i; } WriteMakefile( PREREQ_PM => \%prereqs, );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Asking a question in Makefile.PL
by tachyon-II (Chaplain) on Apr 20, 2008 at 11:20 UTC | |
|
Re^3: Asking a question in Makefile.PL
by Anonymous Monk on Apr 20, 2008 at 19:12 UTC |