line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl -c |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Exception::Argument; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Exception::Argument - Thrown when called function or method with wrong argument |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use Exception::Argument; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub method { |
14
|
|
|
|
|
|
|
my $self = shift; |
15
|
|
|
|
|
|
|
Exception::Argument->throw( |
16
|
|
|
|
|
|
|
message => 'Usage: $obj->method( STR )', |
17
|
|
|
|
|
|
|
) if @_ < 1; |
18
|
|
|
|
|
|
|
my ($str) = @_; |
19
|
|
|
|
|
|
|
print $str; |
20
|
|
|
|
|
|
|
}; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
This class is an L exception thrown when function or method |
25
|
|
|
|
|
|
|
was called with wrong argument. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=for readme stop |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
1
|
|
11
|
use 5.006; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
32
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
33
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
42
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
our $VERSION = 0.05; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
use Exception::Base 0.21 ( |
39
|
1
|
|
|
|
|
6
|
'Exception::Argument' => { |
40
|
|
|
|
|
|
|
isa => 'Exception::Died', |
41
|
|
|
|
|
|
|
message => 'Bad argument', |
42
|
|
|
|
|
|
|
}, |
43
|
1
|
|
|
1
|
|
4
|
); |
|
1
|
|
|
|
|
20
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |