CAB/Format/Null.pm

filter: Statementstmt 60.0% 15 / 25 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 38.4% 5 / 13 Podpod 100% 8 / 8 totaltotal 54.9% 28 / 51 CC 2 SCAR 7.9
CC
2
Cov
54%
new
6.0
parseDocument
2.0
mimeType
2.0
CRAP 2.2
« CAB/Format/XmlTokWrap.pm ↑ Summary CAB/Analyzer/Automaton/Gfsm.pm »
1 ## -*- Mode: CPerl -*-
2 ##
3 ## File: DTA::CAB::Format::Null.pm
4 ## Author: Bryan Jurish <moocow@cpan.org>
5 ## Description: Datum parser|formatter: null formatter
6  
7 package DTA::CAB::Format::Null;
8 1 ▶use DTA::CAB::Format;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use DTA::CAB::Datum ':all';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 ##==============================================================================
14 ## Globals
15 ##==============================================================================
16  
17 1 our @ISA = qw(DTA::CAB::Format);
18  
19 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
20 #DTA::CAB::Format->registerFormat(name=>__PACKAGE__, filenameRegex=>qr/\.(?i:prl|pl|perl|dump)$/);
21 1 DTA::CAB::Format->registerFormat(name=>__PACKAGE__);
22 }
23  
24 ##==============================================================================
25 ## Constructors etc.
26 ##==============================================================================
27  
28 ## $fmt = CLASS_OR_OBJ->new(%args)
29 ## + object structure: assumed HASH
30 ## (
31 ## ##---- INHERITED from DTA::CAB::Format
32 ## )
33 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
34 0 my $that = shift;
35 0 ▶ my $fmt = bless({
Condition0%0/3
ref $that || $that
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $that || $that
ref $that $that
Truth table0%0/3
A || B
A= ref $thatB= $that
ABresult
1X1
011
000
36 ##-- I/O common
37 utf8 => undef,
38  
39 ##-- user args
40 @_
41 }, ref($that)||$that);
42 0 return $fmt;
43 }
44  
45 ##==============================================================================
46 ## Methods: Persistence
47 ##==============================================================================
48  
49 ## @keys = $class_or_obj->noSaveKeys()
50 ## + returns list of keys not to be saved
51  
52  
53 ##==============================================================================
54 ## Methods: Input
55 ##==============================================================================
56  
57 ##--------------------------------------------------------------
58 ## Methods: Input: Generic API
59  
60 ## $doc = $fmt->parseDocument()
61 0 ▶sub parseDocument { return DTA::CAB::Document->new; }
Subroutine parseDocument: not called CC=1 SCAR=6.9
Pod documented
62  
63  
64 ##==============================================================================
65 ## Methods: Output
66 ##==============================================================================
67  
68 ##--------------------------------------------------------------
69 ## Methods: Output: Generic
70  
71 ## $type = $fmt->mimeType()
72 ## + default returns text/plain
73 0 ▶sub mimeType { return 'text/plain'; }
Subroutine mimeType: not called CC=1 SCAR=6.9
Pod documented
74  
75 ## $ext = $fmt->defaultExtension()
76 ## + returns default filename extension for this format
77 0 ▶sub defaultExtension { return '.null'; }
Subroutine defaultExtension: not called CC=1 SCAR=6.9
Pod documented
78  
79 ##--------------------------------------------------------------
80 ## Methods: Output: API
81  
82 ## $fmt_or_undef = $fmt->toFh($fh,$formatLevel)
83 ## + flush buffered output document to filehandle $fh
84 ## + default implementation calls to $fmt->formatString($formatLevel)
85 0 ▶sub toFh {
Subroutine toFh: not called CC=1 SCAR=6.9
Pod documented
86 0 return $_[0];
87 }
88  
89 ##--------------------------------------------------------------
90 ## Methods: Output: Generic API
91  
92 ## $fmt = $fmt->putToken($tok)
93 0 ▶sub putToken { return $_[0]; }
Subroutine putToken: not called CC=1 SCAR=6.9
Pod documented
94  
95 ## $fmt = $fmt->putSentence($sent)
96 0 ▶sub putSentence { return $_[0]; }
Subroutine putSentence: not called CC=1 SCAR=6.9
Pod documented
97  
98 ## $fmt = $fmt->putDocument($doc)
99 0 ▶sub putDocument { return $_[0]; }
Subroutine putDocument: not called CC=1 SCAR=6.9
Pod documented
100  
101  
102 1 1; ##-- be happy
103  
104 __END__
« CAB/Format/XmlTokWrap.pm ↑ Summary CAB/Analyzer/Automaton/Gfsm.pm »