Tokenized/File.pm

filter: Statementstmt 86.3% 19 / 22 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 2 / 2 totaltotal 84.3% 27 / 32 CC 2 SCAR 3.6
CC
2
Cov
83%
new
2.0
open
2.0
BEGIN
1.0
CRAP 1.4
« Tokenized.pm ↑ Summary
1 package IO::Tokenized::File;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use base qw(IO::Tokenized IO::File);
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 $VERSION = '0.05';
9  
10  
11 # new has the following synopsis:
12 # IO::Tokenized::File->new([$tokens [,$filename]])
13  
14 1 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod documented
15 1 my $class = shift;
16 1 my ($filename,@tokens) = @_;
17 1 ▶ my $self = defined $filename ? IO::File->new($filename): IO::File->new();
Branch: 1 branch
BranchTrueFalseTotal
defined $filename ? : 1 0 1
18 1 $self = IO::Tokenized->new($self,@tokens);
19 1 bless $self,$class;
20 }
21  
22 # redefine so that only opening for input is allowed
23 0 ▶sub open {
Subroutine open: not called CC=1 SCAR=6.9
Pod documented
24 0 my $self = shift;
25 0 my ($filename) = @_; #silently ignore other parameters
26 0 $self->SUPER::open($filename,"r");
27 }
28  
29 2 1;
30  
31 __END__
« Tokenized.pm ↑ Summary