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