blib/lib/CPAN/Exception/yaml_process_error.pm

filter: Statementstmt 31.4% 11 / 35 Branchbran 0.0% 0 / 16 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 42.8% 3 / 7 Podpod 0.0% 0 / 4 totaltotal 22.5% 14 / 62 CC 9 SCAR 30.2
CC
9
Cov
22%
as_string
30.0
as_string
30.0
new
2.0
CRAP 20.5
« blib/lib/App/Cpan.pm ↑ Summary blib/lib/CPAN/HTTP/Credentials.pm »
1 # -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*-
2 # vim: ts=4 sts=4 sw=4:
3 package CPAN::Exception::yaml_process_error;
4 26 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 26 ▶use overload '""' => "as_string";
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 26 ▶use vars qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
8 $VERSION
9 26 );
10 26 $VERSION = "5.5";
11  
12  
13 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
14 0 ▶ my($class,$module,$file,$during,$error) = @_;
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
15 # my $at = Carp::longmess(""); # XXX find something more beautiful
16 0 bless { module => $module,
17 file => $file,
18 during => $during,
19 error => $error,
20 # at => $at,
21 }, $class;
22 }
23  
24 0 ▶sub as_string {
Subroutine as_string: not called CC=5 SCAR=34.0
Pod undocumented
25 0 ▶ my($self) = shift;
Subroutine as_string: not called CC=5 SCAR=34.0
Pod undocumented
26 0 ▶ if ($self->{during}) {
Branch: 2 branches
BranchTrueFalseTotal
if ($self->{'during'}) { } 0 0 0
if ($self->{'during'}) { } 0 0 0
27 0 ▶ if ($self->{file}) {
Branch: 2 branches
BranchTrueFalseTotal
if ($self->{'file'}) { } 0 0 0
if ($self->{'file'}) { } 0 0 0
28 0 ▶ if ($self->{module}) {
Branch: 2 branches
BranchTrueFalseTotal
if ($self->{'module'}) { } 0 0 0
if ($self->{'module'}) { } 0 0 0
29 0 ▶ if ($self->{error}) {
Branch: 2 branches
BranchTrueFalseTotal
if ($self->{'error'}) { } 0 0 0
if ($self->{'error'}) { } 0 0 0
30 0 return "Alert: While trying to '$self->{during}' YAML file\n".
31 " '$self->{file}'\n".
32 "with '$self->{module}' the following error was encountered:\n".
33 " $self->{error}\n";
34 } else {
35 0 return "Alert: While trying to '$self->{during}' YAML file\n".
36 " '$self->{file}'\n".
37 "with '$self->{module}' some unknown error was encountered\n";
38 }
39 } else {
40 0 return "Alert: While trying to '$self->{during}' YAML file\n".
41 " '$self->{file}'\n".
42 "some unknown error was encountered\n";
43 }
44 } else {
45 0 return "Alert: While trying to '$self->{during}' some YAML file\n".
46 "some unknown error was encountered\n";
47 }
48 } else {
49 0 return "Alert: unknown error encountered\n";
50 }
51 }
52  
53 26 1;
« blib/lib/App/Cpan.pm ↑ Summary blib/lib/CPAN/HTTP/Credentials.pm »