Kusarigama/Wrapper/Exception.pm

filter: Statementstmt 48.0% 12 / 25 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 37.5% 3 / 8 Podpod 0.0% 0 / 4 totaltotal 38.4% 15 / 39 CC 2 SCAR 9.4
CC
2
Cov
44%
_stringify
6.0
new
2.0
output
2.0
CRAP 2.6
« Kusarigama/Task.pm ↑ Summary Kusarigama/Plugin/Renew.pm »
1 package Taskwarrior::Kusarigama::Wrapper::Exception;
2 6 our $AUTHORITY = 'cpan:YANICK';
3 # ABSTRACT: Exception class for Taskwarrior::Kusarigama::Wrapper
4 6 $Taskwarrior::Kusarigama::Wrapper::Exception::VERSION = '0.10.0';
5 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 0 ▶sub new { my $class = shift; bless { @_ } => $class }
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
9  
10 use overload (
11 6 q("") => '_stringify',
12 fallback => 1,
13 6 ▶);
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 sub _stringify {
16 0 ▶ my ($self) = @_;
Subroutine _stringify: not called CC=2 SCAR=17.9
17 0 my $error = $self->error;
18 0 ▶ return $error if $error =~ /\S/;
Branch: 1 branch
BranchTrueFalseTotal
if $error =~ /\S/ 0 0 0
19 0 return "task exited non-zero but had no output to stderr";
20 }
21  
22 0 ▶sub output { join "", map { "$_\n" } @{ shift->{output} } }
Subroutine output: not called CC=1 SCAR=6.9
Pod undocumented
23  
24 0 ▶sub error { join "", map { "$_\n" } @{ shift->{error} } }
Subroutine error: not called CC=1 SCAR=6.9
Pod undocumented
25  
26 0 ▶sub status { shift->{status} }
Subroutine status: not called CC=1 SCAR=6.9
Pod undocumented
27  
28 6 1;
29  
30 __END__
31  
32 =pod
33  
34 =encoding UTF-8
35  
36 =head1 NAME
37  
38 Taskwarrior::Kusarigama::Wrapper::Exception - Exception class for Taskwarrior::Kusarigama::Wrapper
39  
40 =head1 VERSION
41  
42 version 0.10.0
43  
44 =head1 AUTHOR
45  
46 Yanick Champoux <yanick@cpan.org>
47  
48 =head1 COPYRIGHT AND LICENSE
49  
50 This software is copyright (c) 2018, 2017 by Yanick Champoux.
51  
52 This is free software; you can redistribute it and/or modify it under
53 the same terms as the Perl 5 programming language system itself.
54  
55 =cut
« Kusarigama/Task.pm ↑ Summary Kusarigama/Plugin/Renew.pm »