ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Devel-FindRef/FindRef.pm
(Generate patch)

Comparing Devel-FindRef/FindRef.pm (file contents):
Revision 1.27 by root, Thu Apr 5 05:11:14 2012 UTC vs.
Revision 1.28 by root, Sat Apr 13 06:29:39 2013 UTC

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
202Sometimes you know (from debugging output) the address of a perl scalar 202Sometimes you know (from debugging output) the address of a perl value you
203you are interested in (e.g. C<HASH(0x176ff70)>). This function can be used 203are interested in (e.g. C<HASH(0x176ff70)>). This function can be used to
204to turn the address into a reference to that scalar. It is quite safe to 204turn the address into a reference to that value. It is quite safe to call
205call on valid addresses, but extremely dangerous to call on invalid ones. 205on valid addresses, but extremely dangerous to call on invalid ones. I<No
206checks whatsoever will be done>, so don't use this unless you really know
207the 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
212The opposite of C<ptr2ref>, above: returns the internal address of the 214The opposite of C<ptr2ref>, above: returns the internal address of the
213value pointed to by the passed reference. I<No checks whatsoever will be 215value pointed to by the passed reference. This function is safe to call on
214done>, so don't use this. 216anything, and returns the same value taht a normal reference would if used
217in a numeric context.
215 218
216=back 219=back
217 220
218=head1 ENVIRONMENT VARIABLES 221=head1 ENVIRONMENT VARIABLES
219 222

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines