lib/Mojo/IOLoop/ReadWriteProcess/Exception.pm

filter: Statementstmt 100% 9 / 9 Branchbran 100% 2 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 3 / 3 Podpod 100% 2 / 2 totaltotal 80.9% 17 / 21 CC 3 SCAR 8.3
CC
3
Cov
86%
new
3.1
BEGIN
1.0
to_string
1.0
CRAP 2.3
« builder/custom.pm ↑ Summary lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v1.pm »
1 package Mojo::IOLoop::ReadWriteProcess::Exception;
2 39 ▶use Mojo::Base -base;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 85 ▶sub new {
Subroutine new: called CC=3 SCAR=11.4
Pod documented
5 85 my $class = shift;
6 85 ▶ my $value = @_ == 1 ? $_[0] : "";
Branch: 1 branch
BranchTrueFalseTotal
@_ == 1 ? : 83 2 85
7 85 ▶ return bless \$value, ref $class || $class;
Condition33%1/3
ref $class || $class
l!l&&r!l&&!r
0850
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
8 }
9  
10 14 ▶sub to_string { "${$_[0]}" }
Subroutine to_string: called CC=1 SCAR=0.0
Pod documented
11  
12 39 1;
13  
14 =encoding utf-8
15  
16 =head1 NAME
17  
18 Mojo::IOLoop::ReadWriteProcess::Exception - Exception object for Mojo::IOLoop::ReadWriteProcess.
19  
20 =head1 SYNOPSIS
21  
22 use Mojo::IOLoop::ReadWriteProcess::Exception;
23  
24 my $e = Mojo::IOLoop::ReadWriteProcess::Exception->new("Errored!");
25  
26 print "Error $e";
27  
28 my $string_error = $e->to_string;
29  
30 =head1 METHODS
31  
32 L<Mojo::IOLoop::ReadWriteProcess::Exception> inherits all methods from L<Mojo::Base> and implements
33 the following new ones.
34  
35 =head2 to_string
36  
37 my $e = Mojo::IOLoop::ReadWriteProcess::Exception->new("Errored!");
38 my $string_error = $e->to_string;
39  
40 Returns stringified version of the error message.
41  
42 =head1 LICENSE
43  
44 Copyright (C) Ettore Di Giacinto.
45  
46 This library is free software; you can redistribute it and/or modify
47 it under the same terms as Perl itself.
48  
49 =head1 AUTHOR
50  
51 Ettore Di Giacinto E<lt>edigiacinto@suse.comE<gt>
52  
53 =cut
« builder/custom.pm ↑ Summary lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v1.pm »