| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
12
|
|
|
12
|
|
77670
|
use 5.008001; |
|
|
12
|
|
|
|
|
48
|
|
|
2
|
12
|
|
|
12
|
|
60
|
use strict; |
|
|
12
|
|
|
|
|
21
|
|
|
|
12
|
|
|
|
|
285
|
|
|
3
|
12
|
|
|
12
|
|
53
|
use warnings; |
|
|
12
|
|
|
|
|
22
|
|
|
|
12
|
|
|
|
|
595
|
|
|
4
|
|
|
|
|
|
|
package Getopt::Lucid::Exception; |
|
5
|
|
|
|
|
|
|
# ABSTRACT: Exception classes for Getopt::Lucid |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.09'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
12
|
|
|
12
|
|
67
|
use Exporter; |
|
|
12
|
|
|
|
|
21
|
|
|
|
12
|
|
|
|
|
1290
|
|
|
10
|
|
|
|
|
|
|
our @ISA = qw/Exporter Exception::Class::Base/; |
|
11
|
|
|
|
|
|
|
our @EXPORT = qw( throw_spec throw_argv throw_usage); |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use Exception::Class 1.23 ( |
|
14
|
12
|
|
|
|
|
112
|
"Getopt::Lucid::Exception" => { |
|
15
|
|
|
|
|
|
|
description => "Unidentified exception", |
|
16
|
|
|
|
|
|
|
}, |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
"Getopt::Lucid::Exception::Spec" => { |
|
19
|
|
|
|
|
|
|
description => "Invalid specification", |
|
20
|
|
|
|
|
|
|
}, |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
"Getopt::Lucid::Exception::ARGV" => { |
|
23
|
|
|
|
|
|
|
description => "Invalid argument on command line", |
|
24
|
|
|
|
|
|
|
fields => ['usage'], |
|
25
|
|
|
|
|
|
|
}, |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
"Getopt::Lucid::Exception::Usage" => { |
|
28
|
|
|
|
|
|
|
description => "Invalid usage", |
|
29
|
|
|
|
|
|
|
}, |
|
30
|
|
|
|
|
|
|
|
|
31
|
12
|
|
|
12
|
|
638
|
); |
|
|
12
|
|
|
|
|
12223
|
|
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
my %throwers = ( |
|
34
|
|
|
|
|
|
|
throw_spec => "Getopt::Lucid::Exception::Spec", |
|
35
|
|
|
|
|
|
|
throw_argv => "Getopt::Lucid::Exception::ARGV", |
|
36
|
|
|
|
|
|
|
throw_usage => "Getopt::Lucid::Exception::Usage", |
|
37
|
|
|
|
|
|
|
); |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
for my $t ( keys %throwers ) { |
|
40
|
12
|
|
|
12
|
|
12731
|
no strict 'refs'; |
|
|
12
|
|
|
|
|
25
|
|
|
|
12
|
|
|
|
|
1246
|
|
|
41
|
69
|
|
|
69
|
|
439
|
*{$t} = sub { $throwers{$t}->throw(message => "$_[0]\n", @_[1..$#_]) }; |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |