in reply to checking reference equality
A (blessed) reference can overload stringification or eq or == or numerification(?) so any of them can fail. I just use == since it is so much simpler than eq when it comes to references (it doesn't involve constructing a multi-part string, just interpretting a pointer as an integer).
overload's StrVal() documentation recommends Scalar::Util's refaddr(), which would then allow you to use == without worrying about overloading.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: checking reference equality (refaddr)
by perl5ever (Pilgrim) on May 11, 2009 at 05:13 UTC |