p5-mop-redux
p5-mop-redux copied to clipboard
A(nother) MOP for Perl 5
Right now, to create an accessor using the mop, you need to do something like ``` $meta->add_method( $meta->method_class->new( name => $attr->key_name, body => sub { my $self = shift; $attr->fetch_data_in_slot_for($self);...
``` 11:25 phaylon: reminds me: I was wondering if `has $!x = 23; has $!y is lazy = $!x` should work 11:43 ilmari_: given that the initialiser has access to...
If a class sets `method_class` to a certain value, it should then be able to assume that all methods defined in a class whose metaclass inherits from it also inherit...
While i have to agree with @stevan that the old `AUTOLOAD` api in Perl is horrible, i believe some implementation of the concept is necessary. If not for new modules,...
Please do some trickery that attributes can be hashes and arrays. Using scalars to act as references to arrays and hashes is .. awkward(?) :-)
## mop ``` use mop; use v5.16; class Test { has $!one is ro = 1; has $!two = 2; method sum { $!one + $!two } } say my...
Eventually, we'll need to start working on a real parser in the core, rather than the Parse::Keyword + twigils + Variable::Magic thing we have going on now. That's still a...
Please implement that methods can take not only lists of parameters but also named parameters.