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 al
On Jul 23, 2009, at 12:37 AM, Hans Dieter Pearcey wrote:
On Thu, Jul 23, 2009 at 12:32:12AM -0400, Stevan Little wrote:
So, if we were to go more with the Ruby model of Module then actually
this is not that far off. Ruby modules are the entire basis of their
mixins system (which we all know is
Goro,
But the problem is that Class also has the notion of inheritance,
which Roles do not.
This is the closest I have come to a Class/Role model, but i never
figured out how to implement it cleanly.
http://img.skitch.com/20090723-qjrrm9m52uj5919nn67wj7ddrr.jpg
Class is an instance of
On Thu, Jul 23, 2009 at 12:32:12AM -0400, Stevan Little wrote:
> So, if we were to go more with the Ruby model of Module then actually
> this is not that far off. Ruby modules are the entire basis of their
> mixins system (which we all know is the poor mans roles). So adding
> method-ish type
On Jul 23, 2009, at 12:20 AM, Hans Dieter Pearcey wrote:
On Thu, Jul 23, 2009 at 12:07:22AM -0400, Stevan Little wrote:
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 s
On Thu, Jul 23, 2009 at 01:21:18PM +0900, Goro Fuji wrote:
> I wonder why Role inherits methods from Class.
Do you mean "doesn't inherit"? Right now they're basically duplicated.
> Even if a role is not a Class, we can override the can() method.
>
> package Moose::Meta::Role;
> our @ISA = qw(
On Thu, Jul 23, 2009 at 12:21 AM, Goro Fuji wrote:
> Hi,
>
> I wonder why Role inherits methods from Class.
>
> Even if a role is not a Class, we can override the can() method.
>
> package Moose::Meta::Role;
> our @ISA = qw(Class::MOP::Class);
> sub isa{
> my($self, $class) = @_;
> return $se
Hi,
I wonder why Role inherits methods from Class.
Even if a role is not a Class, we can override the can() method.
package Moose::Meta::Role;
our @ISA = qw(Class::MOP::Class);
sub isa{
my($self, $class) = @_;
return $self->SUPER::isa($class) && (ref $self || $self) ne
'Class::MOP::Class
On Thu, Jul 23, 2009 at 12:12 AM, Hans Dieter Pearcey wrote:
> On Thu, Jul 23, 2009 at 12:08:14AM -0400, Stevan Little wrote:
>> "Module", it is already there a Module isa Package and a Class isa
>> Module.
>
> I know Module is there, but there's nothing in the current concept of a Perl
> module th
On Thu, Jul 23, 2009 at 12:07:22AM -0400, Stevan Little wrote:
> 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
On Thu, Jul 23, 2009 at 12:08:14AM -0400, Stevan Little wrote:
> "Module", it is already there a Module isa Package and a Class isa
> Module.
I know Module is there, but there's nothing in the current concept of a Perl
module that implies it is only for methods (vs. functions).
hdp.
On Jul 23, 2009, at 12:03 AM, Hans Dieter Pearcey wrote:
On Wed, Jul 22, 2009 at 08:54:08PM -0400, 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 th
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,
On Wed, Jul 22, 2009 at 08:54:08PM -0400, 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 c
On Wed, Jul 22, 2009 at 11:22 PM, Dave Rolsky wrote:
> On Wed, 22 Jul 2009, Stevan Little wrote:
>> 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 terrib
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_
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?
And perha
I just merged the method_map_move branch into master; this takes all of the
methods that operate only on the current class's methods and moves them into
CMOP::Package (get_method, has_method, etc.).
CMOP::Class still has everything to do with introspection of (possibly)
inherited methods.
This cl
18 matches
Mail list logo