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, 2023 INABA Hitoshi in a CPAN |
9
|
|
|
|
|
|
|
###################################################################### |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
$VERSION = '0.17'; |
12
|
|
|
|
|
|
|
$VERSION = $VERSION; |
13
|
|
|
|
|
|
|
|
14
|
3
|
|
|
3
|
|
10785
|
use 5.00503; |
|
3
|
|
|
|
|
22
|
|
15
|
3
|
|
|
3
|
|
15
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
140
|
|
16
|
3
|
50
|
|
3
|
|
76
|
BEGIN { $INC{'warnings.pm'} = '' if $] < 5.006 }; use warnings; $^W=1; |
|
3
|
|
|
3
|
|
16
|
|
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
245
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub import { |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# provides Fake::Our environment to both perl 5.00503 and 5.006(or later) |
21
|
3
|
50
|
|
3
|
|
32
|
if ($^H & 0x00000400) { # is strict qw(vars) enabled? |
22
|
3
|
|
|
|
|
23
|
strict::->unimport(qw(vars)); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
3
|
50
|
|
|
|
222
|
if ($] < 5.006) { |
26
|
3
|
|
|
3
|
|
18
|
no strict 'refs'; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
246
|
|
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__ |