Exception/Fatal.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Exception/Argument.pm ↑ Summary
1 #!/usr/bin/perl -c
2  
3 package Exception::Fatal;
4  
5 =head1 NAME
6  
7 Exception::Fatal - Thrown when core function has a fatal error
8  
9 =head1 SYNOPSIS
10  
11 use Exception::Fatal;
12  
13 eval {
14 open my $fh, '/etc/passwd', '+badmode';
15 };
16 if ($@) {
17 my $e = Exception::Fatal->catch;
18 $e->throw( message => 'Cannot open' );
19 };
20  
21 =head1 DESCRIPTION
22  
23 This class is an L<Exception::Died> exception thrown when core function has a
24 trappable fatal error.
25  
26 =for readme stop
27  
28 =cut
29  
30 1 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
31 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
32 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
33  
34 1 our $VERSION = 0.05;
35  
36  
37 1 ▶use Exception::Base 0.21 (
Subroutine BEGIN: called CC=1 SCAR=0.0
38 1 'Exception::Fatal' => {
39 isa => 'Exception::Died',
40 message => 'Unknown function failed',
41 },
42 1 );
43  
44  
45 1 1;
46  
47  
48 __END__
« Exception/Argument.pm ↑ Summary