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, 2019 INABA Hitoshi in a CPAN |
9
|
|
|
|
|
|
|
###################################################################### |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
$VERSION = '0.16'; |
12
|
|
|
|
|
|
|
$VERSION = $VERSION; |
13
|
|
|
|
|
|
|
|
14
|
3
|
|
|
3
|
|
10533
|
use 5.00503; |
|
3
|
|
|
|
|
22
|
|
15
|
3
|
|
|
3
|
|
16
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
103
|
|
16
|
3
|
50
|
|
3
|
|
70
|
BEGIN { $INC{'warnings.pm'} = '' if $] < 5.006 }; use warnings; $^W=1; |
|
3
|
|
|
3
|
|
15
|
|
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
240
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub import { |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# provides Fake::Our environment to both perl 5.00503 and 5.006(or later) |
21
|
3
|
50
|
|
3
|
|
31
|
if ($^H & 0x00000400) { # is strict qw(vars) enabled? |
22
|
3
|
|
|
|
|
23
|
strict::->unimport(qw(vars)); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
3
|
50
|
|
|
|
212
|
if ($] < 5.006) { |
26
|
3
|
|
|
3
|
|
18
|
no strict 'refs'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
223
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# fake 'our' |
29
|
0
|
|
|
0
|
|
|
*{caller() . '::our'} = sub { @_ }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# *{caller() . '::our'} = sub : lvalue { @_ }; # perl 5.00503 can't :lvalue |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |