develooper Front page | perl.perl5.porters | Postings from September 2012

Re: Changing the Perl error message when a module is not found

Thread Previous | Thread Next
From:
jvromans
Date:
September 17, 2012 01:00
Subject:
Re: Changing the Perl error message when a module is not found
Message ID:
20566.55444.705118.627487@phoenix.squirrel.nl
[Quoting Michael Stapelberg, on September 17 2012, 09:48, in "Re: Changing the Per"]
> How about this instead?
> 
>     Can't locate LWP/UserAgent.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.12.4
> /usr/local/share/perl/5.12.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.12
> /usr/share/perl/5.12 /usr/local/lib/site_perl .) at -e line 1. 
>     BEGIN failed--compilation aborted at -e line 1.
> 
>     The above error is most likely caused by Perl not finding the module
>     LWP::UserAgent. Try installing LWP::UserAgent from your distribution
>     or via CPAN. Run 'perldoc perlmodinst' for more information.

This is already handled (mostly) when 'use diagnostics' is in effect
(although the current message text might be improved by including
specific details on moduel loading and install).

-- Johan

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About