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

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

Thread Previous | Thread Next
From:
Paul Johnson
Date:
September 20, 2013 16:25
Subject:
Re: [perl #119907] Add module name to "Can't locate ..." errormessage?
Message ID:
20130920162532.GL13275@pjcj.net
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.

:)

-- 
Paul Johnson - paul@pjcj.net
http://www.pjcj.net

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