File Coverage

blib/lib/Business/GL/Postalcode.pm
Criterion Covered Total %
statement 24 24 100.0
branch n/a
condition n/a
subroutine 11 11 100.0
pod 7 7 100.0
total 42 42 100.0


line stmt bran cond sub pod time code
1             package Business::GL::Postalcode;
2              
3 2     2   31586 use strict;
  2         3  
  2         51  
4 2     2   7 use warnings;
  2         3  
  2         49  
5 2     2   44 use 5.010; #5.10.0
  2         6  
6              
7 2     2   871 use Class::Business::GL::Postalcode;
  2         5  
  2         474  
8              
9             require Exporter;
10              
11             our @ISA = qw(Exporter);
12             our @EXPORT_OK = qw(get_all_data get_all_postalcodes get_all_cities get_postalcode_from_city get_city_from_postalcode validate_postalcode validate);
13              
14             our $VERSION = '0.05';
15              
16             sub get_all_data {
17 2     2 1 710 my $validator = Class::Business::GL::Postalcode->new();
18              
19 2         7 return $validator->postal_data();
20             }
21              
22             sub get_all_postalcodes {
23 1     1 1 723 my $validator = Class::Business::GL::Postalcode->new();
24              
25 1         5 return $validator->get_all_postalcodes();
26             }
27              
28             sub get_all_cities {
29 1     1 1 1197 my $validator = Class::Business::GL::Postalcode->new();
30              
31 1         3 return $validator->get_all_cities();
32             }
33              
34             sub get_city_from_postalcode {
35 1     1 1 591 my $validator = Class::Business::GL::Postalcode->new();
36              
37 1         4 return $validator->get_city_from_postalcode( $_[0] );
38             }
39              
40             sub get_postalcode_from_city {
41 1     1 1 618 my $validator = Class::Business::GL::Postalcode->new();
42              
43 1         4 return $validator->get_postalcode_from_city( $_[0] );
44             }
45              
46             sub validate {
47 10000     10000 1 142703 return validate_postalcode( $_[0] );
48             }
49              
50             sub validate_postalcode {
51 20000     20000 1 209136 my $validator = Class::Business::GL::Postalcode->new();
52              
53 20000         55648 return $validator->validate( $_[0] );
54             }
55              
56             1;
57              
58             __END__