warnings - Perl pragma to control optional warnings |
warnings - Perl pragma to control optional warnings
use warnings; no warnings;
use warnings "all"; no warnings "all";
use warnings::register; if (warnings::enabled()) { warnings::warn("some warning"); }
if (warnings::enabled("void")) { warnings::warn("void", "some warning"); }
If no import list is supplied, all possible warnings are either enabled or disabled.
A number of functions are provided to assist module authors.
$category
is enabled in the
calling module. Otherwise returns FALSE.
If the parameter, $category
, isn't supplied, the current package name
will be used.
$category
to ``FATAL'', print
$message
to STDERR.
If the calling module has set $category
to ``FATAL'', print $message
STDERR then die.
If the parameter, $category
, isn't supplied, the current package name
will be used.
See Pragmatic Modules in the perlmod manpage and the perllexwarn manpage.
warnings - Perl pragma to control optional warnings |