line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package autodie::variables; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$autodie::variables::VERSION = '0.005'; |
4
|
|
|
|
|
|
|
} |
5
|
1
|
|
|
1
|
|
724
|
use 5.010; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
39
|
|
6
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
7
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
26
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
6
|
use XSLoader; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
171
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
XSLoader::load(__PACKAGE__, __PACKAGE__->VERSION); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
_reset_global($_) for ($<, $>, $(, $)); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub import { |
16
|
1
|
|
|
1
|
|
7
|
$^H |= 0x020000; |
17
|
1
|
|
|
|
|
7
|
$^H{autodie_variables} = 1; |
18
|
1
|
|
|
|
|
29
|
return; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub unimport { |
22
|
0
|
|
|
0
|
|
|
$^H |= 0x020000; |
23
|
0
|
|
|
|
|
|
$^H{autodie_variables} = 0; |
24
|
0
|
|
|
|
|
|
return; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# ABSTRACT: Safe user and group ID variables |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=pod |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 NAME |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
autodie::variables - Safe user and group ID variables |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 VERSION |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
version 0.005 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 SYNOPSIS |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
use autodie::variables; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
local $> = $<; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 DESCRIPTION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This module overrides the magic on the user and group ID variables (C<< $< >>, C<< $> >>, C<$(>, C<$)>) to throw errors when assignment to them fails. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=for Pod::Coverage unimport |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 AUTHOR |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Leon Timmermans |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This software is copyright (c) 2011 by Leon Timmermans. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
64
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
__END__ |