NAME

exact - Perl pseudo pragma to enable strict, warnings, features, mro, filehandle methods

VERSION

version 1.02

SYNOPSIS

Instead of this:

use strict;
use warnings;
use feature ':5.23';
use feature qw( signatures refaliasing bitwise );
use mro 'c3';
use IO::File;
use IO::Handle;

no warnings "experimental::signatures";
no warnings "experimental::refaliasing";
no warnings "experimental::bitwise";

Type this:

use exact;

Or for finer control, add some trailing modifiers like a line of the following:

use exact '5.20';
use exact qw( 5.16 nowarnings noc3 noexperiments );
use exact qw( noexperiments fc signatures );

DESCRIPTION

exact is a Perl pseudo pragma to enable strict, warnings, features, mro, and filehandle methods. The goal is to reduce header boilerplate, assuming defaults that seem to make sense but allowing overrides easily.

By default, exact will:

  • enable strict

  • enable warnings

  • load the latest feature bundle supported by the current Perl version

  • load all experimental features and switch off experimental warnings

  • set C3 style of mro

  • enable methods on filehandles

IMPORT FLAGS

exact supports the following import flags:

nostrict

This skips turning on the strict pragma.

nowarnings

This skips turning on the warnings pragma.

noc3

This skips setting C3 mro.

nobundle

Normally, exact will look at your current version and find the highest supported feature bundle and enable it. Applying nobundle causes this behavior to be skipped. You can still explicitly set bundles yourself.

noexperiments

This skips enabling all features currently labled experimental by feature.

noskipexperimentalwarnings

Normally, exact will disable experimental warnings. This skips that disabling step.

Explicit Features and Bundles by Name

You can always provide a list of explicit features and bundles from feature. If provided, these will be enabled regardless of the other import flags set.

use exact qw( noexperiments fc signatures );

Bundles provided can be exactly like those described in feature or in a variety of obvious forms:

  • :5.26

  • 5.26

  • v5.26

  • 26

SEE ALSO

You can look for additional information at:

AUTHOR

Gryphon Shafer <gryphon@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Gryphon Shafer.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.