Indexed/StorableN.pm

filter: Statementstmt 100% 13 / 13 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 20 / 20 CC 2 SCAR 3.4
CC
2
Cov
100%
writeData
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« Indexed/FreezeN.pm ↑ Summary
1 ##-*- Mode: CPerl -*-
2 ##
3 ## File: Tie/File/Indexed/StorableN.pm
4 ## Author: Bryan Jurish <moocow@cpan.org>
5 ## Description: tied array access to indexed data files: Storable-encoded references (network byte-order)
6  
7 package Tie::File::Indexed::StorableN;
8 2 ▶use Tie::File::Indexed::Storable;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use Storable;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 ##======================================================================
13 ## Globals
14  
15 2 our @ISA = qw(Tie::File::Indexed::Storable);
16  
17 ##======================================================================
18 ## Subclass API: Data I/O: overrides
19  
20 ## $bool = $tfi->writeData($utf8_string)
21 ## + override transparently encodes $data using Storable::nstore_fd()
22 10 ▶sub writeData {
Subroutine writeData: called CC=2 SCAR=6.9
Pod documented
23 10 ▶ return 1 if (!defined($_[1])); ##-- don't waste space on undef
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_[1] 1 9 10
24 9 return Storable::nstore_fd($_[1],$_[0]{datfh});
25 }
26  
27  
28 2 1; ##-- be happpy
« Indexed/FreezeN.pm ↑ Summary