ex::caution - Perl pragma for enabling or disabling strictures and warnings simultaneously


ex-caution documentation Contained in the ex-caution distribution.

Index


Code Index:

NAME

Top

ex::caution - Perl pragma for enabling or disabling strictures and warnings simultaneously

SYNOPSIS

Top

  use ex::caution;
  no ex:caution;

DESCRIPTION

Top

ex:caution allows you to enable or disable warnings and strictures simultaneously with one command. Unlike either strict or warnings it does not support arguments. It is all or nothing.

    use ex::caution;

is exactly equivalent to

    use strict;
    use warnings;

and

    no ex::caution;

is exactly equivalent to

    no strict;
    no warnings;

EXPORT

Enables warnings and stricts in the lexical scope in which it is used.

NOTE

Top

This module is currently in the 'ex' namespace as this is the approved way to release experimental pragmata. If approved it will be renamed to simply 'caution';

BUGS

Top

Its probably a bug that we support

    no caution;

but, well, not supporting it wouldn't be the Perl way.

SEE ALSO

Top

strict, warnings

AUTHOR

Top

Original idea and packaging by Yves Orton, <demerphq@>. The amazingly simple implementation was posted by Aaron Crane to the Perl5Porters mailing list in response to a mail by yves.

COPYRIGHT AND LICENSE

Top


ex-caution documentation Contained in the ex-caution distribution.

package ex::caution;
use strict;
use warnings;
our $VERSION = '0.01';

sub import {
        strict->import;
        warnings->import;
}

sub unimport {
        strict->unimport;
        warnings->unimport;
}

1;


1;
__END__