CAB/Analyzer/EqRW/BDB.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 ## -*- Mode: CPerl -*-
2 ##
3 ## File: DTA::CAB::Analyzer::EqRW::BDB.pm
4 ## Author: Bryan Jurish <moocow@cpan.org>
5 ## Description: DB dictionary-based equivalence-class expander, rewrite variant
6  
7 package DTA::CAB::Analyzer::EqRW::BDB;
8 use DTA::CAB::Analyzer ':child';
9 use DTA::CAB::Analyzer::Dict;
10 use DTA::CAB::Analyzer::Dict::BDB;
11 use strict;
12 #no strict ('subs');
13  
14 ##==============================================================================
15 ## Globals
16 ##==============================================================================
17  
18 our @ISA = qw(DTA::CAB::Analyzer::Dict::BDB);
19  
20 ##==============================================================================
21 ## Constructors etc.
22 ##==============================================================================
23  
24 ## $obj = CLASS_OR_OBJ->new(%args)
25 ## + object structure: see DTA::CAB::Analyzer::Dict::BDB
26 sub new {
27 my $that = shift;
28 return $that->SUPER::new(
29 ##-- options
30 label => 'eqrw',
31 eqIdWeight => 0,
32 allowRegex => '(?:^[[:alpha:]\-\x{ac}]*[[:alpha:]]+$)|(?:^[[:alpha:]]+[[:alpha:]\-\x{ac}]+$)',
33 ##
34 analyzeCode => join("\n",
35 'return if (defined($_->{$lab})); ##-- avoid re-analysis',
36 '$val=undef; ##-- re-initialize temporary used by _am_fst_uniq',
37 '$_->{$lab}=['._am_fst_usort(
38 _am_id_fst('$_', '$dic->{eqIdWeight}')
39 .', map {defined($_) ? '._am_tt_fst_list('$_').' : qw()}'
40 .' @$dhash{'._am_xtext.','._am_xlit.','._am_rw.'}'
41 ).'];',
42 ),
43  
44  
45 ##-- user args
46 @_
47 );
48 }
49  
50  
51 1; ##-- be happy
52  
53 __END__