| 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
| |||||||||||||||||||||
| 7 | 85 | ▶ | return bless \$value, ref $class || $class; | ||||||||||||||||||
|
Condition33%1/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 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 | ||||||||||||||||||||