X.pm

filter: Statementstmt 100% 10 / 10 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 100% 2 / 2 totaltotal 94.1% 16 / 17 CC 2 SCAR 4.2
CC
2
Cov
92%
experimental_warnings
2.0
BEGIN
1.0
experimental_versions
1.0
CRAP 1.5
« TwentyTwo.pm ↑ Summary Eight.pm »
1 package Five::X;
2  
3 7 our $VERSION = '0.01_01';
4  
5 7 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 7 our @EXPORT = qw/ experimental_versions experimental_warnings /;
7  
8 # These are experimental warnings without a feature, and backward incompatible!
9 # I'd like to say: use Five::Ten ':experimental';
10 # and be able to use given/when on 5.18
11 7 my %experimental = (
12 '5.018' => [qw/experimental::smartmatch/],
13 '5.020' => [qw/experimental::autoderef/],
14 '5.022' => [qw/experimental::const_attr/],
15 );
16  
17 3 ▶sub experimental_versions {
Subroutine experimental_versions: called CC=1 SCAR=0.0
Pod documented
18 3 return sort keys %experimental;
19 }
20  
21 6 ▶sub experimental_warnings {
Subroutine experimental_warnings: called CC=2 SCAR=7.1
Pod documented
22 6 my ($version) = @_;
23 6 ▶ return [ ] if !exists $experimental{$version};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $experimental{$version} 0 6 6
24 6 return $experimental{$version};
25 }
26  
27 =head1 NAME
28  
29 FiveX - A set of modules that enable strict and warnings and features
30  
31 =head1 SYNOPSIS
32  
33 #! /usr/bin/perl
34 use Five::Ten; # use 5.010; use feature ':5.10'; use strict; use warnings;
35 say "Turned on features for 5.10";
36  
37 =head1 DESCRIPTION
38  
39 Either of these modules turns on strict, warnings and features in the calling package.
40  
41 =head2 use feature
42  
43 Starting with perl version 5.18, some features are experimental. These will
44 not be switched on by default, you'll have to add the ':experimental' tag.
45  
46 =head2 experimental_versions
47  
48 Returns an ordered list of versions that have warings in the C<experimental::>
49 class without a feature category.
50  
51 =head2 experimental_warnings($version)
52  
53 Returns a listref of the warnings in the C<experimental::> class for the given
54 perl version.
55  
56 =head1 COPYRIGHT
57  
58 (c) MMXV - Abe Timmerman <abeltje@cpan.org>
59  
60 =cut
« TwentyTwo.pm ↑ Summary Eight.pm »