in reply to Re^4: $object->UnrelatedPackage::some_subroutine()
in thread $object->UnrelatedPackage::some_subroutine()

The OP was talking about exactly the trick that makes NEXT:: work.

In a way, but not exactly. The OP was refering to using this trick to make $dbh be the first argument in a function (not a method).

NEXT is all about controlled method dispatch.

For the record, I do agree with you, many of perl's dark corners can be very useful. But only if used in a sane way. What the OP is proposing (using a dark corner of the object system to call functions in a funny way) is not a sane use of this feature/bug/dark-corner.

-stvn

Replies are listed 'Best First'.
Re^6: $object->UnrelatedPackage::some_subroutine()
by tilly (Archbishop) on Feb 19, 2005 at 03:12 UTC
    Point. I saw that the OP had discovered the "dispatch an object to anywhere that you want" functionality, and didn't pay too close of attention to what object and where it was going.

    I still don't consider the dispatch trick to be a bad thing to know about. But I'd agree that this is not a good use of it. (Though it isn't really all that bad, other than its being a pointless way to give something a different syntax.)