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
Mark Overmeer
September 17, 2012 01:03
Re: Changing the Perl error message when a module is not found
Message ID:
* Michael Stapelberg ( [120917 07:49]:
> >    Can't locate LWP/ in @INC (@INC contains: ...) at -e line 1. 
> How about this instead?
>     Can't locate LWP/ in @INC (@INC contains: ...)
>     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.

  use diagnostics;

    (F) You said to do (or require, or use) a file that couldn't be
    found. Perl looks for the file in all the locations mentioned in @INC,
    unless the file name included the full path to the file.  Perhaps you
    need to set the PERL5LIB or PERL5OPT environment variable to say where
    the extra library is, or maybe the script needs to add the library name
    to @INC.  Or maybe you just misspelled the name of the file.  See
    perlfunc/require and lib.

Perl's errors do not explain how to get resolved, unless you flag

Is this case so special?  Developers know what it this error means.
End-users should report it to the package maintainer as bug-report,
so do not need to be able to resolve this by themselves.


       Mark Overmeer MSc                                MARKOV Solutions                         

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About