1 ---------------------------------------------------------------------
3 ---------------------------------------------------------------------
5 - clean up all ->initialize($_[0]) handling
9 We should always be sure that $_[0] is a package name, and not
12 - make &compute_all_applicable_attributes not return a HASH
16 All the info in the HASH is discoverable through the meta-object.
18 - General Purpose &clone_instance method
20 (PARTIALLY DONE) - need to implement the deep cloning
22 It can be a method of the metaclass, like construct_instance is,
23 actually it should be called clone_instance, and it should
24 be thought of as a low-level cloning function, so it should not
25 do any blessing or anything of the sort. That is left for the
26 class to implement, as is the construct_instance.
28 - General Purpose &new_object and &clone_object method
30 I seem to be writing a new method each time, but since we dont
31 have a Object class to always inherit from, this is needed.
32 However, there is nothing to say that I cannot do something like:
34 Foo->meta->new_object()
38 $foo->meta->clone_object()
40 Give it some more thought, but I think it is the best way to
43 - Role/Trait/Scalar-style mixin mechanism
45 This is fairly simple with the MOP, but the trick comes with
46 any SUPER:: calls. This will be a very tricky problem I think.
48 * see Class::Trait::Base, and maybe use anon-classes for this.
49 * review the Scalar model for mix-ins
50 * I like the Class does Role, Role isa Class from Perl 6 idea.
54 Should handle metaclass incompatibility issue, and do it through
55 class mixin composition.
57 - Prototype-style example
59 Make a C::MOP::Class subclass which has an AUTOLOAD method, the
60 method will DWIM depending up on the value it is passed.
62 Foo->prototype->say_hello(sub { print "Hello" });
64 This will turn into this:
66 Foo->prototype->add_method('say_hello' => sub { print "Hello" });
68 I am not sure how we should handle non-method arguments, mostly
69 because those would be static prototype variables, which would
70 translate to class package variables.
72 - Make a Class::MOP::Package
74 Class::MOP::Class would be a subclass of this, but I am not sure
75 this is worth the time.