line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyright (c) 2014, cPanel, Inc. |
2
|
|
|
|
|
|
|
# All rights reserved. |
3
|
|
|
|
|
|
|
# http://cpanel.net/ |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# This is free software; you can redistribute it and/or modify it under the same |
6
|
|
|
|
|
|
|
# terms as Perl itself. See the LICENSE file for further details. |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package Filesys::POSIX::Error; |
9
|
|
|
|
|
|
|
|
10
|
30
|
|
|
30
|
|
441
|
use strict; |
|
30
|
|
|
|
|
31
|
|
|
30
|
|
|
|
|
615
|
|
11
|
30
|
|
|
30
|
|
77
|
use warnings; |
|
30
|
|
|
|
|
28
|
|
|
30
|
|
|
|
|
481
|
|
12
|
|
|
|
|
|
|
|
13
|
30
|
|
|
30
|
|
11143
|
use Errno; |
|
30
|
|
|
|
|
24441
|
|
|
30
|
|
|
|
|
975
|
|
14
|
|
|
|
|
|
|
|
15
|
30
|
|
|
30
|
|
129
|
use Carp (); |
|
30
|
|
|
|
|
32
|
|
|
30
|
|
|
|
|
970
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 NAME |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Filesys::POSIX::Error - Throw Errno values with L |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 SYNOPSIS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
use Filesys::POSIX::Error; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
throw &Errno::ENOENT; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 DESCRIPTION |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
C provides C, a function which allows one to |
30
|
|
|
|
|
|
|
set L|perlvar/$!> and throw a stack trace containing a stringification |
31
|
|
|
|
|
|
|
thereof in one simple action. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
BEGIN { |
36
|
30
|
|
|
30
|
|
97
|
require Exporter; |
37
|
|
|
|
|
|
|
|
38
|
30
|
|
|
|
|
1817
|
our @EXPORT_OK = qw(throw); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
our @ISA = ('Exporter'); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub throw ($) { |
44
|
77
|
|
|
77
|
0
|
119
|
my ($errno) = @_; |
45
|
|
|
|
|
|
|
|
46
|
77
|
|
|
|
|
81
|
$! = $errno; |
47
|
|
|
|
|
|
|
|
48
|
77
|
|
|
|
|
2404
|
Carp::confess "$!"; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |