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

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

Thread Previous
September 18, 2012 03:57
Re: Changing the Perl error message when a module is not found
Message ID:
On 18 September 2012 12:44, Konovalov, Vadim (Vadim)** CTR **
<> wrote:
>> From: demerphq []
>> On 18 September 2012 11:50, Konovalov, Vadim wrote:
>> > please be as short as possible in such messages, because
>> > these sit in perl516.dll
>> >
>> > D:\perl-tests\perl-5.16.0\bin>strings perl516.dll |grep "Can't locate"
>> > Can't locate package %-p for @%2p::ISA
>> > Can't locate object method "%-p" via package "%-p" (perhaps you forgot to load "%-p"?)
>> > Can't locate object method "%-p" via package "%2p"
>> > Can't locate %s
>> > Can't locate %s in @INC%s%s (@INC contains:%-p)
>> > Can't locate %s:   %s
>> > Can't locate object method "%s" via package "%-p"
>> >
>> > Current suggestion suggests to make it thrise as big...... :o :o
>> Given your concerns we eagerly anticipate the patch that strips the
>> "Can't locate" out of those strings in a nice sane way.
> stripping just "Can't locate" will save approx 60+ bytes with a cost of adding complexity, so it hardly worth it.
> Saving could be done with extracting error messages into separate text file,
> with adding benefit of e.g. translatibility,
> and with the same cost of added complexity, thus maintainability,
> and also - perl516.dll should be able to deal with a case of missing such file then,
> maybe this is the way to go.........
> if you're welcoming me to do this, I could spent my weak efforts on this,
> at least for the proof of concept sake,

Personally it doesn't sound like a bad thing. I seem to recall one the
IBM ports added error codes and I think internationalization to all
the messages. I always liked that idea. OTOH, localization without
error codes sucks.

But extracting all our strings into one place means it would be easier
for someone to hack something clever to save space.


perl -Mre=debug -e "/just|another|perl|hacker/"

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