Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I admit it. I'm guilty of UNIVERSAL::can($object, $method). Been there. Done than. Changed them when I run across them in old code. My real beef with UNIVERSAL::can($object, $method) is one of usibility. What couldn't that have just made that method DTRT and simply return false/0 if $object wasn't an object at all. After all, in a sub as simple as this, I just want a true/false. No need to throw errors. It either can, or can't, regardless os whether $objectis or isn't an object.
  • I'm universally replacing
    UNIVERSAL::can($object, 'method')
    eval { $object->can('method') }
    . It Just Works.
    • Randal L. Schwartz
    • Stonehenge