blib/lib/Acme/CPANModules/ModernPreambles.pm

filter: Statementstmt 100% 4 / 4 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 100% 4 / 4 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
↑ Summary
1 package Acme::CPANModules::ModernPreambles;
2  
3 1 our $DATE = '2019-03-03'; # DATE
4 1 our $VERSION = '0.001'; # VERSION
5  
6 1 our $LIST = {
7 summary => 'Modules that offer modern preambles',
8 description => <<'_',
9  
10 The overwhelming convention for coding Perl properly code is to at least add the
11 following preamble:
12  
13 use strict;
14 use warnings;
15  
16 to the beginning of your code. But some people say that's not enough, and they
17 develop modules/pragmas that bundle the above incantation plus some additional
18 stuffs. For example:
19  
20 use Modern::Perl '2018';
21  
22 is equivalent to:
23  
24 use strict;
25 use warnings;
26 use feature ':5.26';
27 mro::set_mro( scalar caller(), 'c3' );
28  
29 I think <pm:Modern::Perl> is one of the first to popularize this modern preamble
30 concept and a bunch of similar preambles emerged. This list catalogs them.
31  
32 Meanwhile, you can also use:
33  
34 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)
35  
36 and so on, but this also means you set a minimum Perl version.
37  
38 _
39 entries => [
40 {module=>'Alt::common::sense::TOBYINK'},
41 {module=>'common::sense'},
42 {module=>'latest'},
43 {module=>'Modern::Perl'},
44 {module=>'nonsense'},
45 {module=>'perl5'},
46 {module=>'perl5i'},
47 ],
48 };
49  
50 1 1;
51 # ABSTRACT: Modules that offer modern preambles
52  
53 __END__
↑ Summary