warnings - warnings.pm emulation for pre-5.6 Perls
Version 0.07
# enable warnings use warnings; # disable warnings no warnings;
This module is a very simple warnings.pm emulation for Perls before 5.6. Its aim is to allow programs that use this pragma to compile and run under old Perls by providing an API emulation, i.e. the functions work the same, but will not behave exactly like the real module. Under the hood, this module simply uses $^W.
warnings.pm
$^W
Shortcomings:
this is a module, not a pragma; therefore it isn't lexical;
categories are "supported" but won't be used;
probably other things..
See the documentation of the real warnings module for more information: http://perldoc.perl.org/warnings.html
warnings
warnings::enabled()
Returns true if the warnings are enabled, false otherwise.
warnings::warn()
Prints the message to STDERR.
STDERR
warnings::warnif()
Prints the message to STDERR if warnings are enabled.
Sébastien Aperghis-Tramoni, <sebastien at aperghis.net>
<sebastien at aperghis.net>
Please report any bugs or feature requests to bug-warnings-compat at rt.cpan.org, or through the web interface at http://rt.cpan.org/Public/Dist/Display.html?Name=warnings-compat. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-warnings-compat at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc warnings
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/warnings-compat
CPAN Ratings
http://cpanratings.perl.org/d/warnings-compat
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=warnings-compat
Search CPAN
http://search.cpan.org/dist/warnings-compat
Copyright 2006, 2007, 2008 Sébastien Aperghis-Tramoni, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install warnings::compat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm warnings::compat
CPAN shell
perl -MCPAN -e shell install warnings::compat
For more information on module installation, please visit the detailed CPAN module installation guide.