line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package IO::Framed::X::WriteError; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=encoding utf-8 |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
IO::Framed::X::WriteError |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use Try::Tiny; |
12
|
|
|
|
|
|
|
use IO::Framed::Write::Blocking; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $iof = IO::Framed::Write::Blocking->new( $some_socket ); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
try { $iof->write('blahblah') } |
17
|
|
|
|
|
|
|
catch { |
18
|
|
|
|
|
|
|
$_->get('OS_ERROR'); #gets $! |
19
|
|
|
|
|
|
|
$_->errno_is('EAGAIN'); #should always be false |
20
|
|
|
|
|
|
|
}; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Thrown on write errors. Subclasses L. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
1
|
|
|
1
|
|
604
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
29
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
1
|
|
5
|
use parent qw( IO::Framed::X::ErrnoBase ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _new { |
34
|
1
|
|
|
1
|
|
173
|
my ($class, $err) = @_; |
35
|
|
|
|
|
|
|
|
36
|
1
|
|
|
|
|
7
|
return $class->SUPER::_new( "Write error: $err", OS_ERROR => $err ); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |