US.pm

filter: Statementstmt 79.3% 23 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod 66.6% 2 / 3 totaltotal 77.5% 31 / 40 CC 2 SCAR 3.7
CC
2
Cov
79%
new
2.0
all_state_codes
2.0
all_state_names
2.0
CRAP 1.4
↑ Summary kruft2codes.pl »
1 package Locale::US;
2 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 $Locale::US::VERSION = '3.04';
4 }
5  
6 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 ▶use Data::Section::Simple;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 # Preloaded methods go here.
14  
15 1 ▶sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod undocumented
16
17 1 my $class = shift;
18 1 my $self = {} ;
19  
20 1 my $data = Data::Section::Simple::get_data_section('states');
21 #die "data: $data";
22  
23 1 my @line = split "\n", $data;
24 #die "LINE: @line";
25  
26 1 for ( @line ) {
27  
28 59 my ($code, $state) = split ':';
29 #warn " my ($code, $state) = split ':';";
30  
31 59 $self->{code2state}{$code} = $state;
32 59 $self->{state2code}{$state} = $code;
33 }
34  
35 #die Dumper $self;
36 1 bless $self, $class;
37 }
38  
39 0 ▶sub all_state_codes {
Subroutine all_state_codes: not called CC=1 SCAR=6.9
Pod documented
40  
41 0 my $self = shift;
42  
43 0 sort keys % { $self->{code2state} } ;
44  
45 }
46  
47 0 ▶sub all_state_names {
Subroutine all_state_names: not called CC=1 SCAR=6.9
Pod documented
48  
49 0 my $self = shift;
50  
51 0 sort keys % { $self->{state2code} } ;
52  
53 }
54  
55 1 1;
56  
57 __DATA__
↑ Summary kruft2codes.pl »