Chas. Owens wrote:
On Fri, May 1, 2009 at 10:18, Gunnar Hjalmarsson <nore...@gunnar.cc>
wrote:
I agree that perldiag says all that needs to be said. But a common
way to work with perldiag is to look up cryptic error or warning
messages when needed rather than using the diagnostics pragma.
Unfortunately the message
Global symbol "%s" requires explicit package name
is not very cryptic, so you are not triggered to check perldiag.
<snip>
But the %s is only cryptic if you are looking in perldiag.
My point was that a cryptic message would have been better. :)
You probably shouldn't look in perldiag yourself, use the diagnostics
pragma (instead of the warnings pragma) to get useful for beginners
warnings/errors:
<snip>
Sure, that's good advice.
But please remember that this discussion started when you let us know:
I once work at a place that wrote Perl 5 as if it were still Perl 4.
They had turned on strict because they had heard it was the right
thing to do, but their response to it failing their scripts was to
move to using only fully qualified variables.
followed by my confession that I once did the same mistake. If you don't
know about proper scoping in Perl 5, there is a great chance that you
don't know about the diagnostics pragma either.
If you learn Perl the 'right' way, you will most likely not make that
mistake, and it doesn't matter that the error message in question is
incomplete. My concern is about those (i.e. us) who happen(ed) to start
coding in Perl without first learning the basics. After all, I believe
there are quite a few of us. ;-)
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/