blib/lib/IO/Infiles.pm

filter: Statementstmt 100% 28 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 1 / 1 totaltotal 100% 37 / 37 CC 2 SCAR 2.0
CC
2
Cov
100%
import
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
↑ Summary
1 package IO::Infiles;
2  
3 6 ▶use v5.8;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 6 ▶use Fatal qw(open);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 6 our $VERSION = '0.06';
9  
10  
11  
12 5 ▶sub inlinefiles {
Subroutine inlinefiles: called CC=1 SCAR=0.0
Pod documented
13 5 m/ ^__([A-Z]\w+)__\s*\n
14 (.*?)
15 (?=__[A-Z]\w+__\s*\n | \Z)
16 /xsmgo;
17 }
18  
19 5 ▶sub import {
Subroutine import: called CC=2 SCAR=6.9
20 5 local $_ = do{ local $/; open 0; <0>};
21 5 (my $pack)= (caller 1)[3] =~ /^(.*::)/g ;
22 5 my %files = inlinefiles;
23 6 ▶ no strict 'refs' ; no warnings 'once';
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
24 5 open *{$pack.$_} , '<', \$files{$_} for keys(%files);
25 }
26  
27  
28 6 1;
29 __END__
↑ Summary