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
|
29
|
|
|
29
|
|
466
|
use strict; |
|
29
|
|
|
|
|
31
|
|
|
29
|
|
|
|
|
877
|
|
11
|
29
|
|
|
29
|
|
114
|
use warnings; |
|
29
|
|
|
|
|
35
|
|
|
29
|
|
|
|
|
599
|
|
12
|
|
|
|
|
|
|
|
13
|
29
|
|
|
29
|
|
13251
|
use Errno; |
|
29
|
|
|
|
|
29145
|
|
|
29
|
|
|
|
|
1192
|
|
14
|
|
|
|
|
|
|
|
15
|
29
|
|
|
29
|
|
155
|
use Carp (); |
|
29
|
|
|
|
|
45
|
|
|
29
|
|
|
|
|
1034
|
|
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
|
29
|
|
|
29
|
|
114
|
require Exporter; |
37
|
|
|
|
|
|
|
|
38
|
29
|
|
|
|
|
2327
|
our @EXPORT_OK = qw(throw); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
our @ISA = ('Exporter'); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub throw ($) { |
44
|
72
|
|
|
72
|
0
|
155
|
my ($errno) = @_; |
45
|
|
|
|
|
|
|
|
46
|
72
|
|
|
|
|
91
|
$! = $errno; |
47
|
|
|
|
|
|
|
|
48
|
72
|
|
|
|
|
2778
|
Carp::confess "$!"; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |