line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Fake::Our; |
2
|
|
|
|
|
|
|
###################################################################### |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Fake::Our - Fake 'our' support for perl 5.00503 |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# http://search.cpan.org/dist/Fake-Our/ |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# Copyright (c) 2014, 2015, 2017, 2018 INABA Hitoshi in a CPAN |
9
|
|
|
|
|
|
|
###################################################################### |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
$VERSION = '0.14'; |
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
9289
|
use 5.00503; |
|
3
|
|
|
|
|
17
|
|
14
|
3
|
|
|
3
|
|
17
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
180
|
|
15
|
|
|
|
|
|
|
local $^W = 1; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub import { |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# provides Fake::Our environment to both perl 5.00503 and 5.006(or later) |
20
|
3
|
50
|
|
3
|
|
30
|
if ($^H & 0x00000400) { # is strict qw(vars) enabled? |
21
|
3
|
|
|
|
|
29
|
strict::->unimport(qw(vars)); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
3
|
50
|
|
|
|
201
|
if ($] < 5.006) { |
25
|
3
|
|
|
3
|
|
16
|
no strict 'refs'; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
191
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# fake 'our' |
28
|
0
|
|
|
0
|
|
|
*{caller() . '::our'} = sub { @_ }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# *{caller() . '::our'} = sub : lvalue { @_ }; # perl 5.00503 can't :lvalue |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |