On Jul 22, 2009, at 11:22 PM, 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?
Sure, I am not married to any name, just throwing on the first one
that came to my mind (and yes, I agree it sucked).
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."
This is because there was nothing else in there so I just documented
what it actually was, not what I conceptually envisioned it to be :)
So it seems to me that a Package can have subroutines.
Yes, well but it also has arrays, hashes, etc etc etc. I guess what I
am thinking is (as Chris says in his response to you) a package is
just a "non-anonymous namespace stash", where a Module could be more
then that (I have many times pondered adding my favorite ML style
module stuff to it actually).
Anyway, just a thought, wanted to open up the conversation and see
where it goes.
- Stevan