line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Error::TypeTiny::WrongNumberOfParameters; |
2
|
|
|
|
|
|
|
|
3
|
54
|
|
|
54
|
|
1965
|
use 5.008001; |
|
54
|
|
|
|
|
198
|
|
4
|
54
|
|
|
54
|
|
319
|
use strict; |
|
54
|
|
|
|
|
121
|
|
|
54
|
|
|
|
|
1401
|
|
5
|
54
|
|
|
54
|
|
318
|
use warnings; |
|
54
|
|
|
|
|
122
|
|
|
54
|
|
|
|
|
2568
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
BEGIN { |
8
|
54
|
|
|
54
|
|
201
|
$Error::TypeTiny::WrongNumberOfParameters::AUTHORITY = 'cpan:TOBYINK'; |
9
|
54
|
|
|
|
|
18836
|
$Error::TypeTiny::WrongNumberOfParameters::VERSION = '2.002001'; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
$Error::TypeTiny::WrongNumberOfParameters::VERSION =~ tr/_//d; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
require Error::TypeTiny; |
15
|
|
|
|
|
|
|
our @ISA = 'Error::TypeTiny'; |
16
|
|
|
|
|
|
|
|
17
|
83
|
|
|
83
|
1
|
326
|
sub minimum { $_[0]{minimum} } |
18
|
61
|
|
|
61
|
1
|
273
|
sub maximum { $_[0]{maximum} } |
19
|
64
|
|
|
64
|
1
|
291
|
sub got { $_[0]{got} } |
20
|
|
|
|
|
|
|
|
21
|
134
|
|
|
134
|
1
|
664
|
sub has_minimum { exists $_[0]{minimum} } |
22
|
55
|
|
|
55
|
1
|
326
|
sub has_maximum { exists $_[0]{maximum} } |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub _build_message { |
25
|
59
|
|
|
59
|
|
149
|
my $e = shift; |
26
|
59
|
100
|
100
|
|
|
171
|
if ( $e->has_minimum and $e->has_maximum and $e->minimum == $e->maximum ) { |
|
|
100
|
100
|
|
|
|
|
|
|
100
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
27
|
18
|
|
|
|
|
52
|
return sprintf( |
28
|
|
|
|
|
|
|
"Wrong number of parameters; got %d; expected %d", |
29
|
|
|
|
|
|
|
$e->got, |
30
|
|
|
|
|
|
|
$e->minimum, |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
elsif ( $e->has_minimum and $e->has_maximum and $e->minimum < $e->maximum ) { |
34
|
12
|
|
|
|
|
29
|
return sprintf( |
35
|
|
|
|
|
|
|
"Wrong number of parameters; got %d; expected %d to %d", |
36
|
|
|
|
|
|
|
$e->got, |
37
|
|
|
|
|
|
|
$e->minimum, |
38
|
|
|
|
|
|
|
$e->maximum, |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
elsif ( $e->has_minimum ) { |
42
|
4
|
|
|
|
|
12
|
return sprintf( |
43
|
|
|
|
|
|
|
"Wrong number of parameters; got %d; expected at least %d", |
44
|
|
|
|
|
|
|
$e->got, |
45
|
|
|
|
|
|
|
$e->minimum, |
46
|
|
|
|
|
|
|
); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
else { |
49
|
25
|
|
|
|
|
73
|
return sprintf( |
50
|
|
|
|
|
|
|
"Wrong number of parameters; got %d", |
51
|
|
|
|
|
|
|
$e->got, |
52
|
|
|
|
|
|
|
); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
} #/ sub _build_message |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |