Exception/Argument.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
« Fatal/Exception.pm ↑ Summary Exception/Fatal.pm »
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::Base> exception thrown when function or method
25 was called with wrong argument.
26  
27 =for readme stop
28  
29 =cut
30  
31 1 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
32 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
33 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
34  
35 1 our $VERSION = 0.05;
36  
37  
38 1 ▶use Exception::Base 0.21 (
Subroutine BEGIN: called CC=1 SCAR=0.0
39 1 'Exception::Argument' => {
40 isa => 'Exception::Died',
41 message => 'Bad argument',
42 },
43 1 );
44  
45  
46 1 1;
47  
48  
49 __END__
« Fatal/Exception.pm ↑ Summary Exception/Fatal.pm »