Dave Rolsky wrote:
On Wed, 22 Jul 2009, Stevan Little wrote:
My only issue with this is that methods are not really parts of
packages, methods are class things. Perhaps we could call it
code_ref_map or something better so we can get the actual
functionality, and then Role and Class can just alias them to
method_mao or something like that?
Can we call it subroutine_map, not code_ref_map?
And perhaps this is something we could put in C::MOP::Module, since
Package is meant to model Perl 5 packages and Module is sort of an
in-between thing that comes from Perl 6 but is not terrible well defined.
According to the docs, "a module is essentially a Class::MOP::Package
with metadata, in our case the version and authority."
So it seems to me that a Package can have subroutines.
If one is looking for a generic term that covers methods and subroutines, either
functional or imperative, I would think that "routine" works best, and yet it is
specific enough to exclude a "block" etc. -- Darren Duncan