Test/Shared/Fixture/Data/OFN/Address/Struct.pm

filter: Statementstmt 100% 3 / 3 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 4 / 4 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« Test/Shared/Fixture/Data/OFN/Address/String.pm ↑ Summary
1 package Test::Shared::Fixture::Data::OFN::Address::Struct;
2  
3 29 ▶use base qw(Data::OFN::Address);
Subroutine BEGIN: called CC=1 SCAR=0.0
4 use strict;
5 use warnings;
6  
7 use Class::Utils qw(split_params);
8 use Data::Text::Simple;
9 use Unicode::UTF8 qw(decode_utf8);
10  
11 our $VERSION = 0.02;
12  
13 sub new {
14 my ($class, @params) = @_;
15  
16 my ($object_params_ar) = split_params(['id'], @params);
17 @params = (
18 @{$object_params_ar},
19 'house_number' => 12,
20 'house_number_type' => decode_utf8('č.p.'),
21 'municipality_name' => [
22 Data::Text::Simple->new(
23 'lang' => 'cs',
24 'text' => decode_utf8('Horní Datová'),
25 ),
26 ],
27 # XXX not standard, what about it?
28 'note' => decode_utf8('dole u řeky'),
29 'psc' => '33101',
30 'street_name' => [
31 Data::Text::Simple->new(
32 'lang' => 'cs',
33 'text' => decode_utf8('Hlavní'),
34 ),
35 ],
36 );
37  
38 my $self = $class->SUPER::new(@params);
39  
40 return $self;
41 }
42  
43 1;
44  
45 __END__
« Test/Shared/Fixture/Data/OFN/Address/String.pm ↑ Summary