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

Re: [perl #119907] Add module name to "Can't locate ..." error message?

Thread Previous | Thread Next
From:
Renee B
Date:
September 23, 2013 17:41
Subject:
Re: [perl #119907] Add module name to "Can't locate ..." error message?
Message ID:
523C764E.40806@perl-services.de
On 20.09.2013 18:12, l.mai@web.de (via RT) wrote:
> % perl -e 'use Foo::Bar::Baz'
> Can't locate Foo/Bar/Baz.pm in @INC (@INC contains: ...) at -e line 1.
> BEGIN failed--compilation aborted at -e line 1.
>
> This message sometimes confuses people who are new to Perl (or just want to run
> an application written in Perl). Would it be possible to add "Do you need to
> install Foo::Bar::Baz?" or some other text that mentions the module name
> somewhere?
>
> Something like:
> - Can't locate Foo/Bar/Baz.pm in @INC (@INC contains: ...) at -e line 1. Do you need to install Foo::Bar::Baz?
> - Can't locate Foo/Bar/Baz.pm in @INC (@INC contains: ...) (do you need to install Foo::Bar::Baz?) at -e line 1.
>
> Would this break anything? Also, suggestions regarding the wording welcome.
>


This is already in Perl (5.19):

$ perl -MMYTEST -e 1
Can't locate MYTEST.pm in @INC (you may need to install the MYTEST
module) (@INC contains:
/home/reneeb/.plenv/versions/5.19.3/lib/perl5/site_perl/5.19.3/i686-linux /home/reneeb/.plenv/versions/5.19.3/lib/perl5/site_perl/5.19.3
/home/reneeb/.plenv/versions/5.19.3/lib/perl5/5.19.3/i686-linux
/home/reneeb/.plenv/versions/5.19.3/lib/perl5/5.19.3 .).
BEGIN failed--compilation aborted.


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