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

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

Thread Previous
From:
Father Chrysostomos via RT
Date:
September 20, 2013 19:33
Subject:
[perl #119907] Add module name to "Can't locate ..." error message?
Message ID:
rt-3.6.HEAD-1873-1379705599-199.119907-15-0@perl.org
On Fri Sep 20 09:26:11 2013, paul@pjcj.net wrote:
> On Fri, Sep 20, 2013 at 09:12:44AM -0700, l.mai@web.de 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.
> 
> Good idea!
> 
> $ perl5.18.1 -e 'use Foo::Bar::Baz'
> Can't locate Foo/Bar/Baz.pm in @INC (you may need to install the
> Foo::Bar::Baz module) (@INC contains: ...) at -e line 1.
> 
> :)

Ah! You beat me to it!

It was v5.17.4-125-gf7ee53b that did it.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=119907

Thread Previous


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