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

When I suggested typeglobbing closures I didn't mean to create AUTOLOAD that way rather than using the usual subroutine definition, I meant that you should create lots of very similar subroutines from a central template rather than try to dynamically dispatch them from AUTOLOAD.

There are a number of wins from doing so, two of the bigger ones being that it plays better with inheritance, and you don't have to put all of the dynamic logic in one big routine.

  • Comment on Re^4: $object->UnrelatedPackage::some_subroutine()