"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm not sure what everyone is so confused about...
A SCALAR is a reference to a scalar. A REF is a reference to a reference. A SCALAR is a reference to data. A REF is a reference to a pointer (of sorts). Personally, I use it all time for writing Decorator classes. Go take a look at Object::Destroyer in CPAN, it wraps around another object containing circular references and makes sure it gets destroyed normally.
So if you Scalar::Util::reftype $Destroyer, you get 'REF'. Which is as it should be because unlike $Object, which could be B<anything> of any type, $Destroyer just points directory to the object it is Decorating In reply to Re: ref == "REF"
by adamk
|
|