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