blib/lib/ExtUtils/XSpp/Exception/stdmessage.pm

filter: Statementstmt 100% 19 / 19 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 50.0% 1 / 2 totaltotal 92.8% 26 / 28 CC 2 SCAR 2.9
CC
2
Cov
95%
handler_code
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« blib/lib/ExtUtils/XSpp/Exception/simple.pm ↑ Summary blib/lib/ExtUtils/XSpp/Typemap/reference.pm »
1 package ExtUtils::XSpp::Exception::stdmessage;
2 21 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 21 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 21 ▶use base 'ExtUtils::XSpp::Exception';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 90 ▶sub init {
Subroutine init: called CC=1 SCAR=0.0
Pod undocumented
7 90 my $this = shift;
8 90 $this->SUPER::init(@_);
9 }
10  
11 87 ▶sub handler_code {
Subroutine handler_code: called CC=2 SCAR=7.0
Pod documented
12 87 my $this = shift;
13 87 my $no_spaces_indent = shift;
14 87 ▶ $no_spaces_indent = 4 if not defined $no_spaces_indent;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $no_spaces_indent 87 0 87
15  
16 87 my $ctype = $this->cpp_type;
17 87 my $msg = "Caught C++ exception of type or derived from '$ctype': \%s";
18 87 my $code = <<HERE;
19 catch ($ctype& e) {
20 croak("$msg", e.what());
21 }
22 HERE
23 87 return $this->indent_code($code, $no_spaces_indent);
24 }
25  
26 21 1;
« blib/lib/ExtUtils/XSpp/Exception/simple.pm ↑ Summary blib/lib/ExtUtils/XSpp/Typemap/reference.pm »