in reply to How do I tell cpan not to use LWP.pm?

untested cpannolwp
#!/usr/bin/perl -- BEGIN { package LWP; $INC{'LWP.pm'} = __FILE__; package LWP::UserAgent; $INC{'LWP/UserAgent.pm'} = __FILE__; } use File::Which; my $cpan = which 'cpan'; do $cpan;

Replies are listed 'Best First'.
Re^2: How do I tell cpan not to use LWP.pm?
by Argel (Prior) on Feb 19, 2010 at 00:46 UTC
    Thanks, but cpan still tries to make some calls to LWP which causes the script to error out (since the fuctions don't exist). Nice idea though.

    Elda Taluta; Sarks Sark; Ark Arks