… | |
… | |
2 | |
2 | |
3 | use strict; |
3 | use strict; |
4 | |
4 | |
5 | use XSLoader; |
5 | use XSLoader; |
6 | |
6 | |
7 | |
|
|
8 | BEGIN { |
7 | BEGIN { |
9 | our $VERSION = '0.2'; |
8 | our $VERSION = '1.0'; |
10 | XSLoader::load __PACKAGE__, $VERSION; |
9 | XSLoader::load __PACKAGE__, $VERSION; |
11 | } |
10 | } |
12 | |
11 | |
13 | =head1 NAME |
12 | =head1 NAME |
14 | |
13 | |
… | |
… | |
157 | my ($about, $excl) = &find_; |
156 | my ($about, $excl) = &find_; |
158 | my %excl = map +($_ => undef), @$excl; |
157 | my %excl = map +($_ => undef), @$excl; |
159 | grep !exists $excl{$_->[1] + 0}, @$about |
158 | grep !exists $excl{$_->[1] + 0}, @$about |
160 | } |
159 | } |
161 | |
160 | |
162 | =item $ref = Devel::FindRef::ref2ptr $ptr |
161 | =item $ref = Devel::FindRef::ptr2ref $integer |
163 | |
162 | |
164 | Sometimes you know (from debugging output) the address of a perl scalar |
163 | Sometimes you know (from debugging output) the address of a perl scalar |
165 | you are interested in. This function can be used to turn the address into |
164 | you are interested in (e.g. C<HASH(0x176ff70)>). This function can be used |
166 | a reference to that scalar. It is quite safe to call on valid addresses, |
165 | to turn the address into a reference to that scalar. It is quite safe to |
167 | but extremely dangerous to call on invalid ones. |
166 | call on valid addresses, but extremely dangerous to call on invalid ones. |
|
|
167 | |
|
|
168 | # we know that HASH(0x176ff70) exists, so turn it into a hashref: |
|
|
169 | my $ref_to_hash = Devel::FindRef::ptr2ref 0x176ff70; |
168 | |
170 | |
169 | =back |
171 | =back |
170 | |
172 | |
171 | =head1 AUTHOR |
173 | =head1 AUTHOR |
172 | |
174 | |