Add a dep for Test::LongString
[gitmo/Moose.git] / TODO
CommitLineData
8b59f8d6 1-------------------------------------------------------------------------------
43d599e5 2 BUGS
3-------------------------------------------------------------------------------
4
5mst: if I do "subtype 'Foo' => as 'Bar';" I get an empty condition and it dies
6
7-------------------------------------------------------------------------------
8b59f8d6 8TODO
9-------------------------------------------------------------------------------
10
8b59f8d6 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
db1ab48d 22'does' can be added to,.. but not changed
23(need type unions for this)
8b59f8d6 24
8b59f8d6 25- proxy attributes
26
db1ab48d 27a proxied attribute is an attribute
28which looks like an attribute,
29talks like an attribute, smells
30like an attribute,.. but if you
31look behind the curtain,.. its
32over there.. in that other object
33
34(... probably be a custom metaclass)
8b59f8d6 35
36- compile time extends
37
38[00:39] sri but maybe a better syntax for compile time extends
39[00:39] stevan I have been pondering that actually
40[00:39] sri use Moose extends => Foo::Bar
41[00:40] stevan I think now that we have the Sub::Exporter stuff
42 in, that kinda thing should be pretty easy
43
8245db56 44nothingmuch notes that all the constructs should be supported in the entirety of the use clause:
45
46 use Moose (
47 has => foo (
48 ....
49 ),
50 );
51
52and that if this usage style is used nothing is exported to the namespace.
53
8b59f8d6 54- default should dclone()
55
8a157bab 56- subtype $anon_subtype => where { ... }
57
58[22:56] stevan sub mst_doesnt_like_to_type { (shift)->meta->attr->type_contstraint }
59[22:57] mst err
60[22:57] stevan :P
61[22:57] stevan are you wanting to reuse it or something?
62[22:57] stevan my $subtype = subtype 'Something' => where { ... };
63[22:58] stevan then you can do isa => $subtype
64[22:58] mst but I can't subtype it again
65[22:59] stevan mst: ahhh...
66[22:59] mst well, I can. but it suddenly gets very "long way round" ish
67[23:00] stevan my $constraint = Moose::Meta::TypeConstraint->new(
68[23:00] stevan name => $name || '__ANON__',
69[23:00] stevan parent => $parent,
70[23:00] stevan constraint => $check,
71[23:00] stevan message => $message,
72[23:00] stevan );
73[23:00] stevan yeah thats kinda the long way
74[23:00] stevan mst: what would you like it to be?
75[23:00] mst $parent = find_type_constraint($parent) if defined $parent;
76[23:00] mst if $parent is already a type constraint
77[23:00] mst skip that bit
78[23:00] stevan hmm
79[23:00] mst should be all you need to change
80[23:00] stevan yeah
81[23:01] stevan so you can then say
82[23:01] stevan subtype $anon => where { ... };
83[23:01] mst right
84[23:01] stevan ok
85
86- method keyword
87
88[23:37] mst more seriously, I'd still like a "method" keyword or something
89[23:37] mst method 'foo' => sub { ... };
90[23:38] stevan what would it do more than sub foo { ... }?
91[23:39] stevan I would like multimethods actually
92[23:39] mst almost exactly nothing, to begin with
93[23:39] stevan but thats just cause I love CLOS and am reading a book on Dylan now
94[23:40] stevan keyword squating :)
95[23:40] mst but if we need to hook stuff later it's bloody handy to already have people writing it that way
96[23:40] mst right
97...
98[23:49] mst oh, also: method 'has' => sub { ... } could squelch the redefine warning
43d599e5 99
f90e052d 100- local coerce
101
102[13:16] mst stevan: slight problem with coerce
103[13:16] mst I only get to declare it once
104[13:17] mst so if I'm trying to declare it cast-style per-source-class rather than per-target-class
105[13:17] mst I am extremely screwed
106[13:17] stevan yes
107[13:17] stevan they are not class specific
108[13:18] stevan they are attached to the type constraint itself
109[13:18] * stevan ponders anon-coercion-metaobjects
110[13:18] mst yes, that's fine
111[13:19] mst but when I declare a class
112[13:19] mst I want to be able to say "this class coerces to X type via <this>"
113[13:19] stevan yeah something like that
114[13:19] stevan oh,.. hmm
115[13:20] stevan sort of like inflate/deflate?
116[13:20] stevan around the accessors?
117[13:25] * bluefeet has quit (Remote host closed the connection)
118[13:27] mst no
119[13:27] mst nothing like that
120[13:27] mst like a cast
121[13:31] mst stevan: $obj->foo($bar); where 'foo' expects a 'Foo' object
122[13:31] mst stevan: is effectively <Foo>$bar, right?
123[13:32] mst stevan: I want to be able to say in package Bar
124[13:32] mst stevan: coerce_to 'Foo' via { ... };
125[13:32] mst etc.
126[13:53] stevan hmm
127
128
8b59f8d6 129-------------------------------------------------------------------------------
130TO PONDER
131-------------------------------------------------------------------------------
132
133- Moose "strict" mode
134
135use Moose 'strict'; This would allow us to have all sort of expensive tests
136which can be turned off in prod.
137
138- Moose::Philosophy.pod
139
140To explain Moose from a very high level
141
687e52bb 142- moosedoc
8b59f8d6 143
687e52bb 144We certainly have enough meta-information to make pretty complete POD docs.
8b59f8d6 145
146
8245db56 147