jk2addict has asked for the wisdom of the Perl Monks concerning the following question:

When did warnings.pm (use warnings) come into existance?

I was cruising Perldoc.com just for giggles, and went into the Perl 5.005_3 section, and there was a warnings perldoc page?!

Or, the other guess would be that the pages on perldoc are incorrect.

I thought the warnings pragma was a 5.6.1 thingamabob. Or maybe I've incorrectly assumed it wasn't part of perl 5 because it was never on my FreeBSD boxens' base perl (now @ 5.005.

Just a tad curious...
-=Chris

edited: Wed Aug 14 15:10:08 2002 by jeffa - title change [was: Silly Question(tm) about warnings.pm]

  • Comment on When did warnings.pm come into existence?

Replies are listed 'Best First'.
Re: Silly Question(tm) about warnings.pm
by Zaxo (Archbishop) on Aug 13, 2002 at 20:43 UTC

    The warnings.pm pragmatic is new to 5.6. Previous versions have the -w command line switch and the $^W global variable. 'Global' is the difference, warnings.pm is lexically scoped.

    After Compline,
    Zaxo

Re: Silly Question(tm) about warnings.pm
by Shendal (Hermit) on Aug 13, 2002 at 20:44 UTC
    From the perl 5.6.0 FAQ:
    How do I temporarily block warnings? If you are running Perl 5.6.0 or better, the use warnings pragma allows fine control of what warning are produced. ...
    Previous versions lacked this pragma, but included the '-w' command line switch.

    Cheers,
    Shendal