From:                   Gabor Szabo <szab...@gmail.com>
> For some reason - maybe because my students are not English speakers -
> many of them type
> 
> use warning;
> 
> Which gives them the following error:
> 
> Can't locate warning.pm in @INC (@INC contains:
> /home/gabor/perl5lib/lib/perl5/site_perl/5.10.0/i486-linux-gnu-thread-multi
> ...

You do not have to explain @INC right away. "Can't locate warning.pm" 
sounds clear enough to me. You tell them Perl libraries/modules have 
the .pm extension and that this message meant that they either 
mistyped the module name or that it's not installed. No need to dive 
into more details.

I think the message would be even better without the "in @INC", but 
that doesn't matter much. The fact that @INC holds the list of 
library directories is apparent.


IMHO if you want to give better explanations, post patches to 
perldiag and add

  use diagnostics;

to the beginner mode programs.

And to find the other possibly problematic code constructs I think 
you'd better use Perl::Critic with whatever settings you think are 
best for beginners than attempting to develop your own. I do believe 
most of the confusing things are already covered.

Jenda
===== je...@krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to