Acme-CPANModules-ModernPreambles
view release on metacpan or search on metacpan
lib/Acme/CPANModules/ModernPreambles.pm view on Meta::CPAN
package Acme::CPANModules::ModernPreambles;
use strict;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-10-29'; # DATE
our $DIST = 'Acme-CPANModules-ModernPreambles'; # DIST
our $VERSION = '0.002'; # VERSION
our $LIST = {
summary => 'List of modules that offer modern preambles',
description => <<'_',
The overwhelming convention for coding Perl properly code is to at least add the
following preamble:
use strict;
use warnings;
to the beginning of your code. But some people say that's not enough, and they
develop modules/pragmas that bundle the above incantation plus some additional
stuffs. For example:
use Modern::Perl '2018';
is equivalent to:
use strict;
use warnings;
use feature ':5.26';
mro::set_mro( scalar caller(), 'c3' );
I think <pm:Modern::Perl> is one of the first to popularize this modern preamble
concept and a bunch of similar preambles emerged. This list catalogs them.
Meanwhile, you can also use:
use v5.12; # enables strict and warnings, as well as all 5.12 features (see <pm:feature> for more details on new features of each perl release)
and so on, but this also means you set a minimum Perl version.
_
entries => [
{module=>'Alt::common::sense::TOBYINK'},
{module=>'common::sense'},
{module=>'latest'},
{module=>'Modern::Perl'},
{module=>'nonsense'},
{module=>'perl5'},
{module=>'perl5i'},
],
};
1;
# ABSTRACT: List of modules that offer modern preambles
__END__
=pod
=encoding UTF-8
=head1 NAME
Acme::CPANModules::ModernPreambles - List of modules that offer modern preambles
=head1 VERSION
This document describes version 0.002 of Acme::CPANModules::ModernPreambles (from Perl distribution Acme-CPANModules-ModernPreambles), released on 2023-10-29.
=head1 DESCRIPTION
The overwhelming convention for coding Perl properly code is to at least add the
following preamble:
use strict;
use warnings;
to the beginning of your code. But some people say that's not enough, and they
develop modules/pragmas that bundle the above incantation plus some additional
stuffs. For example:
use Modern::Perl '2018';
is equivalent to:
use strict;
use warnings;
use feature ':5.26';
mro::set_mro( scalar caller(), 'c3' );
I think L<Modern::Perl> is one of the first to popularize this modern preamble
concept and a bunch of similar preambles emerged. This list catalogs them.
Meanwhile, you can also use:
use v5.12; # enables strict and warnings, as well as all 5.12 features (see L<feature> for more details on new features of each perl release)
and so on, but this also means you set a minimum Perl version.
=head1 ACME::CPANMODULES ENTRIES
=over
=item L<Alt::common::sense::TOBYINK>
Author: L<TOBYINK|https://metacpan.org/author/TOBYINK>
=item L<common::sense>
Author: L<MLEHMANN|https://metacpan.org/author/MLEHMANN>
=item L<latest>
Author: L<ANDYA|https://metacpan.org/author/ANDYA>
=item L<Modern::Perl>
Author: L<CHROMATIC|https://metacpan.org/author/CHROMATIC>
=item L<nonsense>
( run in 1.604 second using v1.01-cache-2.11-cpan-39bf76dae61 )