line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Business::TNTPost::NL::Data; |
2
|
8
|
|
|
8
|
|
52
|
use strict; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
307
|
|
3
|
8
|
|
|
8
|
|
46
|
use base 'Exporter'; |
|
8
|
|
|
|
|
18
|
|
|
8
|
|
|
|
|
2014
|
|
4
|
8
|
|
|
8
|
|
44
|
use vars qw($VERSION @EXPORT @EXPORT_OK %EXPORT_TAGS); |
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
879
|
|
5
|
|
|
|
|
|
|
|
6
|
8
|
|
|
8
|
|
85
|
use Carp; |
|
8
|
|
|
|
|
32
|
|
|
8
|
|
|
|
|
1086
|
|
7
|
8
|
|
|
8
|
|
8700
|
use YAML; |
|
8
|
|
|
|
|
230289
|
|
|
8
|
|
|
|
|
3064
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
$VERSION = 0.11; |
10
|
|
|
|
|
|
|
@EXPORT = qw(); |
11
|
|
|
|
|
|
|
@EXPORT_OK = qw(zones table); |
12
|
|
|
|
|
|
|
%EXPORT_TAGS = ("ALL" => [@EXPORT_OK]); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=pod |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 NAME |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Business::TNTPost::NL::Data - Shipping cost data for Business::TNTPost::NL |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 DESCRIPTION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Data module for Business::TNTPost::NL containing shipping cost |
23
|
|
|
|
|
|
|
information, country zones etc. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Nothing to see here, the show is over, move along please. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head2 METHODS |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
The following methods are used and can be exported |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head3 zones |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Returns a hashref with country and zone numbers |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub zones { |
38
|
19
|
|
|
19
|
1
|
422
|
my %zones = ( |
39
|
|
|
|
|
|
|
0 => [ qw(NL) ], # NL |
40
|
|
|
|
|
|
|
1 => [ qw(BE LU DK DE FR IT AT ES GB SE) ], # EU 1 |
41
|
|
|
|
|
|
|
2 => [ qw(BG EE FI HU IE LV LT PL PT RO SI SK CZ) ], # EU 2 |
42
|
|
|
|
|
|
|
3 => [ qw(AL AD BA IC CY FO GI GR GL IS HR LI MK MD MT |
43
|
|
|
|
|
|
|
ME NO UA SM RS TR VA BY CH) ], # EU 3 |
44
|
|
|
|
|
|
|
); |
45
|
19
|
|
|
|
|
46
|
my %z; |
46
|
19
|
|
|
|
|
68
|
foreach my $key (keys %zones) { |
47
|
76
|
|
|
|
|
90
|
foreach my $val (@{$zones{$key}}) { |
|
76
|
|
|
|
|
178
|
|
48
|
912
|
|
|
|
|
2234
|
$z{$val} = $key; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
} |
51
|
19
|
|
|
|
|
144
|
return \%z; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=pod |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head3 table |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
This method contains the heart of this module, the lookup table |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=cut |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub table { |
63
|
19
|
|
|
19
|
1
|
95
|
my $table = Load(<<'...'); |
64
|
|
|
|
|
|
|
--- |
65
|
|
|
|
|
|
|
# Netherlands |
66
|
|
|
|
|
|
|
netherlands: |
67
|
|
|
|
|
|
|
# Letters (brievenbuspost) |
68
|
|
|
|
|
|
|
small: |
69
|
|
|
|
|
|
|
stamp: |
70
|
|
|
|
|
|
|
'0,20': 0.46 |
71
|
|
|
|
|
|
|
'21,50': 0.92 |
72
|
|
|
|
|
|
|
'51,100': 1.38 |
73
|
|
|
|
|
|
|
'101,250': 1.84 |
74
|
|
|
|
|
|
|
'251,500': 2.30 |
75
|
|
|
|
|
|
|
'501,2000': 2.76 |
76
|
|
|
|
|
|
|
machine: |
77
|
|
|
|
|
|
|
'0,20': 0.42 |
78
|
|
|
|
|
|
|
'21,50': 0.84 |
79
|
|
|
|
|
|
|
'51,100': 1.26 |
80
|
|
|
|
|
|
|
'101,250': 1.67 |
81
|
|
|
|
|
|
|
'251,500': 2.09 |
82
|
|
|
|
|
|
|
'501,2000': 2.51 |
83
|
|
|
|
|
|
|
# Parcels (paketten) |
84
|
|
|
|
|
|
|
large: |
85
|
|
|
|
|
|
|
'0,10000': 6.75 |
86
|
|
|
|
|
|
|
'10001,30000': 12.20 |
87
|
|
|
|
|
|
|
# Register (aangetekend) |
88
|
|
|
|
|
|
|
register: |
89
|
|
|
|
|
|
|
stamp: |
90
|
|
|
|
|
|
|
'0,2000': 7.00 |
91
|
|
|
|
|
|
|
'2001,20000': 8.05 |
92
|
|
|
|
|
|
|
'20001,30000': 13.50 |
93
|
|
|
|
|
|
|
machine: |
94
|
|
|
|
|
|
|
'0,2000': 6.79 |
95
|
|
|
|
|
|
|
'2001,10000': 8.05 |
96
|
|
|
|
|
|
|
# Outside of the Netherlands |
97
|
|
|
|
|
|
|
world: |
98
|
|
|
|
|
|
|
basic: |
99
|
|
|
|
|
|
|
# Within Europe (EU1 & EU2) |
100
|
|
|
|
|
|
|
europe: |
101
|
|
|
|
|
|
|
# Letters (brievenbuspost) |
102
|
|
|
|
|
|
|
small: |
103
|
|
|
|
|
|
|
stamp: |
104
|
|
|
|
|
|
|
priority: |
105
|
|
|
|
|
|
|
'0,20': 0.79 |
106
|
|
|
|
|
|
|
'21,50': 1.58 |
107
|
|
|
|
|
|
|
'51,100': 2.37 |
108
|
|
|
|
|
|
|
'101,250': 3.16 |
109
|
|
|
|
|
|
|
'251,500': 6.32 |
110
|
|
|
|
|
|
|
'501,2000': 8.69 |
111
|
|
|
|
|
|
|
machine: |
112
|
|
|
|
|
|
|
priority: |
113
|
|
|
|
|
|
|
'0,20': 0.77 |
114
|
|
|
|
|
|
|
'21,50': 1.53 |
115
|
|
|
|
|
|
|
'51,100': 2.30 |
116
|
|
|
|
|
|
|
'101,250': 3.07 |
117
|
|
|
|
|
|
|
'251,500': 6.13 |
118
|
|
|
|
|
|
|
'501,2000': 8.43 |
119
|
|
|
|
|
|
|
# Outside Europe |
120
|
|
|
|
|
|
|
world: |
121
|
|
|
|
|
|
|
# Letters (brievenbuspost) |
122
|
|
|
|
|
|
|
small: |
123
|
|
|
|
|
|
|
stamp: |
124
|
|
|
|
|
|
|
priority: |
125
|
|
|
|
|
|
|
'0,20': 0.95 |
126
|
|
|
|
|
|
|
'21,50': 1.90 |
127
|
|
|
|
|
|
|
'51,100': 2.85 |
128
|
|
|
|
|
|
|
'101,250': 5.70 |
129
|
|
|
|
|
|
|
'251,500': 10.45 |
130
|
|
|
|
|
|
|
'501,2000': 16.15 |
131
|
|
|
|
|
|
|
machine: |
132
|
|
|
|
|
|
|
priority: |
133
|
|
|
|
|
|
|
'0,20': 0.92 |
134
|
|
|
|
|
|
|
'21,50': 1.84 |
135
|
|
|
|
|
|
|
'51,100': 2.76 |
136
|
|
|
|
|
|
|
'101,250': 5.53 |
137
|
|
|
|
|
|
|
'251,500': 10.14 |
138
|
|
|
|
|
|
|
'501,2000': 15.67 |
139
|
|
|
|
|
|
|
# Internationaal Pakket Plus (Track&Trace) |
140
|
|
|
|
|
|
|
plus: |
141
|
|
|
|
|
|
|
zone: |
142
|
|
|
|
|
|
|
# EU1 |
143
|
|
|
|
|
|
|
1: |
144
|
|
|
|
|
|
|
'0,2000': 13.00 |
145
|
|
|
|
|
|
|
'2001,5000': 19.50 |
146
|
|
|
|
|
|
|
'5001,10000': 25.00 |
147
|
|
|
|
|
|
|
'10001,20000': 34.00 |
148
|
|
|
|
|
|
|
'20001,30000': 40.46 |
149
|
|
|
|
|
|
|
# EU2 |
150
|
|
|
|
|
|
|
2: |
151
|
|
|
|
|
|
|
'0,2000': 18.50 |
152
|
|
|
|
|
|
|
'2001,5000': 25.00 |
153
|
|
|
|
|
|
|
'5001,10000': 31.00 |
154
|
|
|
|
|
|
|
'10001,20000': 40.00 |
155
|
|
|
|
|
|
|
'20001,30000': 47.60 |
156
|
|
|
|
|
|
|
# EU3 |
157
|
|
|
|
|
|
|
3: |
158
|
|
|
|
|
|
|
'0,2000': 19.30 |
159
|
|
|
|
|
|
|
'2001,5000': 26.30 |
160
|
|
|
|
|
|
|
'5001,10000': 32.30 |
161
|
|
|
|
|
|
|
'10001,20000': 42.30 |
162
|
|
|
|
|
|
|
# RoW |
163
|
|
|
|
|
|
|
4: |
164
|
|
|
|
|
|
|
'0,2000': 24.30 |
165
|
|
|
|
|
|
|
'2001,5000': 34.30 |
166
|
|
|
|
|
|
|
'5001,10000': 58.30 |
167
|
|
|
|
|
|
|
'10001,20000': 105.30 |
168
|
|
|
|
|
|
|
# Register ("aangetekend") |
169
|
|
|
|
|
|
|
register: |
170
|
|
|
|
|
|
|
europe: |
171
|
|
|
|
|
|
|
stamp: |
172
|
|
|
|
|
|
|
'0,2000': 9.48 |
173
|
|
|
|
|
|
|
machine: |
174
|
|
|
|
|
|
|
'0,2000': 9.20 |
175
|
|
|
|
|
|
|
world: |
176
|
|
|
|
|
|
|
stamp: |
177
|
|
|
|
|
|
|
'0,2000': 16.15 |
178
|
|
|
|
|
|
|
machine: |
179
|
|
|
|
|
|
|
'0,2000': 15.67 |
180
|
|
|
|
|
|
|
... |
181
|
19
|
|
|
|
|
1599231
|
return $table; |
182
|
|
|
|
|
|
|
} |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=pod |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=head1 AUTHOR |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
Menno Blom, |
189
|
|
|
|
|
|
|
Eblom@cpan.orgE, |
190
|
|
|
|
|
|
|
L |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
=head1 COPYRIGHT |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
This program is free software; you can redistribute |
195
|
|
|
|
|
|
|
it and/or modify it under the same terms as Perl itself. |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
The full text of the license can be found in the |
198
|
|
|
|
|
|
|
LICENSE file included with this module. |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
=head1 SEE ALSO |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
L, |
203
|
|
|
|
|
|
|
L |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
=cut |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
1; |