File Coverage

blib/lib/Seven.pm
Criterion Covered Total %
statement 29 29 100.0
branch 2 2 100.0
condition 2 3 66.6
subroutine 9 9 100.0
pod n/a
total 42 43 97.6


line stmt bran cond sub pod time code
1             package Seven;
2              
3 2     2   254295 use 5.006;
  2         10  
4 2     2   13 use strict;
  2         5  
  2         82  
5 2     2   28 use warnings;
  2         4  
  2         319  
6              
7             our $VERSION = 0.05;
8              
9             our @FAKE;
10              
11             BEGIN {
12 2     2   239 @FAKE = qw/riot laughter greed dishonesty innocent accountability/;
13             }
14              
15             sub import {
16 2     2   27 my ($self, @import) = @_;
17              
18 2 100 66     16 if (scalar @import == 1 && $import[0] eq 'all') {
19 1         4 @import = @FAKE;
20             }
21              
22 2         8 my $caller = caller;
23              
24 2         7 for (@FAKE) {
25 2     2   16 no strict 'refs';
  2         8  
  2         360  
26 12         63 *{"${caller}::$_"} = sub {
27 6     6   34 my ($cb) = @_;
28 6         15 $cb->();
29 6         68 print "\n";
30 12         60 };
31             }
32             {
33 2     2   42 no strict 'refs';
  2         6  
  2         300  
  2         4  
34 2         164 *{"${caller}::luck"} = sub {
35 1     1   15 print qq|It's the fifthteenth day in another hospital prison, this time I am fully aware and all around me are also, pretty pointless really but we are slowly climbing the ladder with invisibility. The world dictatorship will fall, they are just clinging onto power now.\n|;
36 2         4 };
37             }
38             }
39              
40             1;
41              
42             __END__