perl

 view release on metacpan or  search on metacpan

lib/feature.pm  view on Meta::CPAN

            bareword_filehandles current_sub evalbytes
            fc indirect multidimensional postderef_qq
            say smartmatch state switch unicode_eval
            unicode_strings

  :5.28     apostrophe_as_package_separator
            bareword_filehandles bitwise current_sub
            evalbytes fc indirect multidimensional
            postderef_qq say smartmatch state switch
            unicode_eval unicode_strings

  :5.30     apostrophe_as_package_separator
            bareword_filehandles bitwise current_sub
            evalbytes fc indirect multidimensional
            postderef_qq say smartmatch state switch
            unicode_eval unicode_strings

  :5.32     apostrophe_as_package_separator
            bareword_filehandles bitwise current_sub
            evalbytes fc indirect multidimensional
            postderef_qq say smartmatch state switch
            unicode_eval unicode_strings

  :5.34     apostrophe_as_package_separator
            bareword_filehandles bitwise current_sub
            evalbytes fc indirect multidimensional
            postderef_qq say smartmatch state switch
            unicode_eval unicode_strings

  :5.36     apostrophe_as_package_separator
            bareword_filehandles bitwise current_sub
            evalbytes fc isa postderef_qq say signatures
            smartmatch state unicode_eval
            unicode_strings

  :5.38     apostrophe_as_package_separator bitwise
            current_sub evalbytes fc isa module_true
            postderef_qq say signatures smartmatch state
            unicode_eval unicode_strings

  :5.40     apostrophe_as_package_separator bitwise
            current_sub evalbytes fc isa module_true
            postderef_qq say signatures smartmatch state
            try unicode_eval unicode_strings

  :5.42     bitwise current_sub evalbytes fc isa
            module_true postderef_qq say signatures
            state try unicode_eval unicode_strings

The C<:default> bundle represents the feature set that is enabled before
any C<use feature> or C<no feature> declaration.

Specifying sub-versions such as the C<0> in C<5.14.0> in feature bundles has
no effect.  Feature bundles are guaranteed to be the same for all sub-versions.

  use feature ":5.14.0";    # same as ":5.14"
  use feature ":5.14.1";    # same as ":5.14"

You can also do:

  use feature ":all";

or

  no feature ":all";

but the first may enable features in a later version of Perl that
change the meaning of your code, and the second may disable mechanisms
that are part of Perl's current behavior that have been turned into
features, just as C<indirect> and C<bareword_filehandles> were.

=head1 IMPLICIT LOADING

Instead of loading feature bundles by name, it is easier to let Perl do
implicit loading of a feature bundle for you.

There are two ways to load the C<feature> pragma implicitly:

=over 4

=item *

By using the C<-E> switch on the Perl command-line instead of C<-e>.
That will enable the feature bundle for that version of Perl in the
main compilation unit (that is, the one-liner that follows C<-E>).

=item *

By explicitly requiring a minimum Perl version number for your program, with
the C<use VERSION> construct.  That is,

    use v5.36.0;

will do an implicit

    no feature ':all';
    use feature ':5.36';

and so on.  Note how the trailing sub-version
is automatically stripped from the
version.

But to avoid portability warnings (see L<perlfunc/use>), you may prefer:

    use 5.036;

with the same effect.

If the required version is older than Perl 5.10, the ":default" feature
bundle is automatically loaded instead.

Unlike C<use feature ":5.12">, saying C<use v5.12> (or any higher version)
also does the equivalent of C<use strict>; see L<perlfunc/use> for details.

=back

=head1 CHECKING FEATURES

C<feature> provides some simple APIs to check which features are enabled.

These functions cannot be imported and must be called by their fully



( run in 5.048 seconds using v1.01-cache-2.11-cpan-d8267643d1d )