CAB/Sentence.pm

filter: Statementstmt 91.6% 11 / 12 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 62.5% 15 / 24 CC 3 SCAR 18.7
CC
3
Cov
65%
new
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 6.5
« CAB/Format/XmlVz.pm ↑ Summary CAB/Analyzer/Null.pm »
1 ## -*- Mode: CPerl -*-
2 ##
3 ## File: DTA::CAB::Sentence.pm
4 ## Author: Bryan Jurish <moocow@cpan.org>
5 ## Description: generic API for sentences passed to/from DTA::CAB::Analyzer
6  
7 package DTA::CAB::Sentence;
8 1 ▶use DTA::CAB::Datum;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 ##==============================================================================
13 ## Globals
14 ##==============================================================================
15  
16 1 our @ISA = qw(DTA::CAB::Datum);
17  
18 ##==============================================================================
19 ## Constructors etc.
20 ##==============================================================================
21  
22  
23  
24 ## $s = CLASS_OR_OBJ->new(\@tokens,%args)
25 ## + object structure: HASH
26 ## {
27 ## tokens => \@tokens, ##-- DTA::CAB::Token objects
28 ## ##
29 ## ##-- dta-tokwrap attributes
30 ## xmlid => $id,
31 ## }
32 0 ▶sub new {
Subroutine new: not called CC=3 SCAR=24.8
Pod documented
33 0 ▶ return bless({
Branch: 1 branch
BranchTrueFalseTotal
$#_ >= 1 ? : 0 0 0
Condition0%0/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
34 tokens => ($#_>=1 ? $_[1] : []),
35 @_[2..$#_],
36 }, ref($_[0])||$_[0]);
37 }
38  
39  
40 ##==============================================================================
41 ## Methods: Misc
42 ##==============================================================================
43  
44  
45  
46 1 1; ##-- be happy
47  
48 __END__
« CAB/Format/XmlVz.pm ↑ Summary CAB/Analyzer/Null.pm »