… | |
… | |
197 | grep !($#$_ && exists $excl{ref2ptr $_->[1]}), @$about |
197 | grep !($#$_ && exists $excl{ref2ptr $_->[1]}), @$about |
198 | } |
198 | } |
199 | |
199 | |
200 | =item $ref = Devel::FindRef::ptr2ref $integer |
200 | =item $ref = Devel::FindRef::ptr2ref $integer |
201 | |
201 | |
202 | Sometimes you know (from debugging output) the address of a perl scalar |
202 | Sometimes you know (from debugging output) the address of a perl value you |
203 | you are interested in (e.g. C<HASH(0x176ff70)>). This function can be used |
203 | are interested in (e.g. C<HASH(0x176ff70)>). This function can be used to |
204 | to turn the address into a reference to that scalar. It is quite safe to |
204 | turn the address into a reference to that value. It is quite safe to call |
205 | call on valid addresses, but extremely dangerous to call on invalid ones. |
205 | on valid addresses, but extremely dangerous to call on invalid ones. I<No |
|
|
206 | checks whatsoever will be done>, so don't use this unless you really know |
|
|
207 | the value is the address of a valid perl value. |
206 | |
208 | |
207 | # we know that HASH(0x176ff70) exists, so turn it into a hashref: |
209 | # we know that HASH(0x176ff70) exists, so turn it into a hashref: |
208 | my $ref_to_hash = Devel::FindRef::ptr2ref 0x176ff70; |
210 | my $ref_to_hash = Devel::FindRef::ptr2ref 0x176ff70; |
209 | |
211 | |
210 | =item $ptr = Devel::FindRef::ref2ptr $reference |
212 | =item $ptr = Devel::FindRef::ref2ptr $reference |
211 | |
213 | |
212 | The opposite of C<ptr2ref>, above: returns the internal address of the |
214 | The opposite of C<ptr2ref>, above: returns the internal address of the |
213 | value pointed to by the passed reference. I<No checks whatsoever will be |
215 | value pointed to by the passed reference. This function is safe to call on |
214 | done>, so don't use this. |
216 | anything, and returns the same value taht a normal reference would if used |
|
|
217 | in a numeric context. |
215 | |
218 | |
216 | =back |
219 | =back |
217 | |
220 | |
218 | =head1 ENVIRONMENT VARIABLES |
221 | =head1 ENVIRONMENT VARIABLES |
219 | |
222 | |