… | |
… | |
4 | |
4 | |
5 | use XSLoader; |
5 | use XSLoader; |
6 | use Scalar::Util; |
6 | use Scalar::Util; |
7 | |
7 | |
8 | BEGIN { |
8 | BEGIN { |
9 | our $VERSION = '1.2'; |
9 | our $VERSION = '1.3'; |
10 | XSLoader::load __PACKAGE__, $VERSION; |
10 | XSLoader::load __PACKAGE__, $VERSION; |
11 | } |
11 | } |
12 | |
12 | |
13 | =head1 NAME |
13 | =head1 NAME |
14 | |
14 | |
15 | Devel::FindRef - where is that reference to my scalar hiding? |
15 | Devel::FindRef - where is that reference to my variable hiding? |
16 | |
16 | |
17 | =head1 SYNOPSIS |
17 | =head1 SYNOPSIS |
18 | |
18 | |
19 | use Devel::FindRef; |
19 | use Devel::FindRef; |
20 | |
20 | |
… | |
… | |
45 | testsub; |
45 | testsub; |
46 | |
46 | |
47 | The output is as follows (or similar to this, in case I forget to update |
47 | The output is as follows (or similar to this, in case I forget to update |
48 | the manpage after some changes): |
48 | the manpage after some changes): |
49 | |
49 | |
50 | SCALAR(0x7bd2d0) is |
50 | SCALAR(0x814ece8) is |
51 | in the global $Test::var. |
51 | +- in the global $Test::var. |
52 | referenced by REF(0x7bd240), which is |
52 | +- referenced by REF(0x814f9e4), which is |
53 | in the member 'ukukey2' of HASH(0x7bd228), which is |
|
|
54 | referenced by REF(0x81dae8), which is |
|
|
55 | in the lexical '$local' in CODE(0x81da88), which is |
53 | | in the lexical '$x' in CODE(0x814ed78), which is |
|
|
54 | | the containing scope for CODE(0x820c4b0), which is |
56 | in the global &Test::testsub. |
55 | | in the global &Test::testsub. |
|
|
56 | +- referenced by REF(0x814ed6c), which is |
|
|
57 | | in the member 'ukukey' of HASH(0x81da20c), which is |
|
|
58 | | in the global %Test::hash. |
|
|
59 | +- referenced by REF(0x814ec28), which is |
|
|
60 | | not found anywhere I looked :( |
|
|
61 | +- referenced by REF(0x814eb44), which is |
|
|
62 | in the member 'ukukey2' of HASH(0x814f99c), which is |
57 | referenced by REF(0x81da40), which is |
63 | +- referenced by REF(0x820c450), which is |
|
|
64 | | in the lexical '$local' in CODE(0x820c4b0), which was seen before. |
|
|
65 | +- referenced by REF(0x820c204), which is |
58 | in the global $Test::hash2. |
66 | in the global $Test::hash2. |
59 | referenced by REF(0x79f3f8), which is |
|
|
60 | in the lexical '$x' in CODE(0x79f518), which is |
|
|
61 | the containing scope for CODE(0x81da88), which is |
|
|
62 | in the global &Test::testsub. |
|
|
63 | referenced by REF(0x79f2f0), which is |
|
|
64 | not found anywhere I looked :( |
|
|
65 | referenced by REF(0x79f140), which is |
|
|
66 | in the member 'ukukey' of HASH(0x81d698), which is |
|
|
67 | in the global %Test::hash. |
|
|
68 | |
67 | |
69 | It is a bit convoluted to read, but basically it says that the value |
68 | It is a bit convoluted to read, but basically it says that the value |
70 | stored in C<$var> can be found: |
69 | stored in C<$var> can be found: |
71 | |
70 | |
72 | =over 4 |
71 | =over 4 |