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
|
|
437
|
use strict; |
|
30
|
|
|
|
|
30
|
|
|
30
|
|
|
|
|
602
|
|
11
|
30
|
|
|
30
|
|
82
|
use warnings; |
|
30
|
|
|
|
|
35
|
|
|
30
|
|
|
|
|
471
|
|
12
|
|
|
|
|
|
|
|
13
|
30
|
|
|
30
|
|
11001
|
use Errno; |
|
30
|
|
|
|
|
24951
|
|
|
30
|
|
|
|
|
973
|
|
14
|
|
|
|
|
|
|
|
15
|
30
|
|
|
30
|
|
151
|
use Carp (); |
|
30
|
|
|
|
|
31
|
|
|
30
|
|
|
|
|
927
|
|
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
|
|
95
|
require Exporter; |
37
|
|
|
|
|
|
|
|
38
|
30
|
|
|
|
|
1979
|
our @EXPORT_OK = qw(throw); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
our @ISA = ('Exporter'); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub throw ($) { |
44
|
77
|
|
|
77
|
0
|
133
|
my ($errno) = @_; |
45
|
|
|
|
|
|
|
|
46
|
77
|
|
|
|
|
89
|
$! = $errno; |
47
|
|
|
|
|
|
|
|
48
|
77
|
|
|
|
|
2576
|
Carp::confess "$!"; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |