Lucid/Exception.pm

filter: Statementstmt 100% 26 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 33 / 33 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Lucid.pm ↑ Summary
1 11 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 11 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 package Getopt::Lucid::Exception;
5 # ABSTRACT: Exception classes for Getopt::Lucid
6  
7 11 our $VERSION = '1.08';
8  
9 11 ▶use Exporter;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 11 our @ISA = qw/Exporter Exception::Class::Base/;
11 11 our @EXPORT = qw( throw_spec throw_argv throw_usage);
12  
13 use Exception::Class 1.23 (
14 11 "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 },
25  
26 "Getopt::Lucid::Exception::Usage" => {
27 description => "Invalid usage",
28 },
29  
30 11 ▶);
Subroutine BEGIN: called CC=1 SCAR=0.0
31  
32 11 my %throwers = (
33 throw_spec => "Getopt::Lucid::Exception::Spec",
34 throw_argv => "Getopt::Lucid::Exception::ARGV",
35 throw_usage => "Getopt::Lucid::Exception::Usage",
36 );
37  
38 11 for my $t ( keys %throwers ) {
39 11 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
40 69 ▶ *{$t} = sub { $throwers{$t}->throw("$_[0]\n") };
Subroutine __ANON__: called CC=1 SCAR=0.0
41 }
42  
43 11 1;
44  
45 __END__
« Lucid.pm ↑ Summary