On Tue, Sep 17, 2013 at 04:15:38PM -0400, Leon Timmermans via RT wrote:
Show quoted text> I don't think there's a reliable way to detect which cpan client/version is running exactly and what its capabilities are (there are some environmental variables but they're a mess).
Sure there is.
If it's old enough to be complete shit, it'll run Makefile.PL.
So, what we do is - generate an MBT Build.PL and an EUMM Makefile.PL, and
at the top of the Makefile.PL have -
warn <<EOW
*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***
If you're seeing this warning, your toolchain is really, really old and
you'll almost certainly have problems installing CPAN modules from this
century. But never fear, dear user, for we have the technology to fix this!
If you're using CPAN.pm to install things, then you can upgrade it using:
cpan CPAN
If you're using CPANPLUS to install things, then you can upgrade it using:
cpanp CPANPLUS
If you're using cpanminus, you shouldn't be seeing this message in the first
place, so please file an issue on github.
If you're installing manually, please retrain your fingers to run Build.PL
when present instead.
This public service announcement was brought to you by the Perl Toolchain
Gang, the irc.perl.org #toolchain IRC channel, and the number 42.
EOW
sleep 10 if -t *STDIN;
That should provide maximum odds of interactive users with ancient setups
getting something better, while still letting non-interactive smoking work
and ribasushi continue to indulge his gerontophilia fetish.
--
Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue
http://shadowcat.co.uk/blog/matt-s-trout/ http://twitter.com/shadowcat_mst/
Email me now on mst (at) shadowcat.co.uk and let's chat about how our CPAN
commercial support, training and consultancy packages could help your team.