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