IO/Tokenized/Scalar.pm

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