foo
[gitmo/Moose.git] / TODO
CommitLineData
8b59f8d6 1-------------------------------------------------------------------------------
2TODO
3-------------------------------------------------------------------------------
4
5- make way to iterate over all Moose classes
6
7- roles
8
9Need to figure out the details of composite roles
10
11- type unions
12
13Add support for doing it with Classes which do not have
14a type constraint yet created
15
16- type intersections
17
18Mostly just for Roles
19
20- inherited slot specs
21
22[10:49] stevan does can be added to,.. but not changed
23
24- triggers
25
26[18:18] mst what I'd really like is just to say trigger => 'some_method'
27
28- attribute delgates
29
8245db56 30Introduce capability to control the generated wrapper. Useful for when you have
31a wrapper that should implement the interface of it's child, but decorate with
32more metadata.
8b59f8d6 33
34- proxy attributes
35
36[15:49] stevan you want a proxied attribute
37[15:49] stevan which looks like an attribute,
38 talks like an attribute, smells
39 like an attribute,.. but if you
40 look behind the curtain,.. its
41 over there.. in that other object
8b59f8d6 42
43- compile time extends
44
45[00:39] sri but maybe a better syntax for compile time extends
46[00:39] stevan I have been pondering that actually
47[00:39] sri use Moose extends => Foo::Bar
48[00:40] stevan I think now that we have the Sub::Exporter stuff
49 in, that kinda thing should be pretty easy
50
8245db56 51nothingmuch notes that all the constructs should be supported in the entirety of the use clause:
52
53 use Moose (
54 has => foo (
55 ....
56 ),
57 );
58
59and that if this usage style is used nothing is exported to the namespace.
60
8b59f8d6 61- default should dclone()
62
687e52bb 63- auto_deref => 1 for auto-de-refing ARRAY and HASH attrs
64
8a157bab 65- subtype $anon_subtype => where { ... }
66
67[22:56] stevan sub mst_doesnt_like_to_type { (shift)->meta->attr->type_contstraint }
68[22:57] mst err
69[22:57] stevan :P
70[22:57] stevan are you wanting to reuse it or something?
71[22:57] stevan my $subtype = subtype 'Something' => where { ... };
72[22:58] stevan then you can do isa => $subtype
73[22:58] mst but I can't subtype it again
74[22:59] stevan mst: ahhh...
75[22:59] mst well, I can. but it suddenly gets very "long way round" ish
76[23:00] stevan my $constraint = Moose::Meta::TypeConstraint->new(
77[23:00] stevan name => $name || '__ANON__',
78[23:00] stevan parent => $parent,
79[23:00] stevan constraint => $check,
80[23:00] stevan message => $message,
81[23:00] stevan );
82[23:00] stevan yeah thats kinda the long way
83[23:00] stevan mst: what would you like it to be?
84[23:00] mst $parent = find_type_constraint($parent) if defined $parent;
85[23:00] mst if $parent is already a type constraint
86[23:00] mst skip that bit
87[23:00] stevan hmm
88[23:00] mst should be all you need to change
89[23:00] stevan yeah
90[23:01] stevan so you can then say
91[23:01] stevan subtype $anon => where { ... };
92[23:01] mst right
93[23:01] stevan ok
94
95- method keyword
96
97[23:37] mst more seriously, I'd still like a "method" keyword or something
98[23:37] mst method 'foo' => sub { ... };
99[23:38] stevan what would it do more than sub foo { ... }?
100[23:39] stevan I would like multimethods actually
101[23:39] mst almost exactly nothing, to begin with
102[23:39] stevan but thats just cause I love CLOS and am reading a book on Dylan now
103[23:40] stevan keyword squating :)
104[23:40] mst but if we need to hook stuff later it's bloody handy to already have people writing it that way
105[23:40] mst right
106...
107[23:49] mst oh, also: method 'has' => sub { ... } could squelch the redefine warning
108
8b59f8d6 109-------------------------------------------------------------------------------
110TO PONDER
111-------------------------------------------------------------------------------
112
113- Moose "strict" mode
114
115use Moose 'strict'; This would allow us to have all sort of expensive tests
116which can be turned off in prod.
117
118- Moose::Philosophy.pod
119
120To explain Moose from a very high level
121
687e52bb 122- moosedoc
8b59f8d6 123
687e52bb 124We certainly have enough meta-information to make pretty complete POD docs.
8b59f8d6 125
126
8245db56 127