pass the in_global_destruction state to DEMOLISHALL and DEMOLISH
[gitmo/Moose.git] / TODO
CommitLineData
8b59f8d6 1-------------------------------------------------------------------------------
43d599e5 2 BUGS
d03bd989 3-------------------------------------------------------------------------------
43d599e5 4
5-------------------------------------------------------------------------------
8b59f8d6 6TODO
7-------------------------------------------------------------------------------
8
d4967760 9- DDuncan's Str types
10
d03bd989 11subtype 'Str'
12 => as 'Value'
13 => where { Encode::is_utf8( $_[0] ) or $_[0] !~ m/[^0x00-0x7F]/x }
d4967760 14 => optimize_as { defined($_[0]) && !ref($_[0]) };
15
d03bd989 16subtype 'Blob'
17 => as 'Value'
18 => where { !Encode::is_utf8( $_[0] ) }
d4967760 19 => optimize_as { defined($_[0]) && !ref($_[0]) };
20
21
715ea0b7 22- should handle some moose-specific options in &Moose::Meta::Class::create
d03bd989 23 things like roles, and method modifiers (although those can probably be
715ea0b7 24 ignored if i want to)
25
8b59f8d6 26- type unions
27
d03bd989 28Add support for doing it with Classes which do not have
8b59f8d6 29a type constraint yet created
30
31- type intersections
32
33Mostly just for Roles
34
35- inherited slot specs
36
db1ab48d 37'does' can be added to,.. but not changed
38(need type unions for this)
8b59f8d6 39
8b59f8d6 40- proxy attributes
41
db1ab48d 42a proxied attribute is an attribute
d03bd989 43which looks like an attribute,
44talks like an attribute, smells
45like an attribute,.. but if you
46look behind the curtain,.. its
db1ab48d 47over there.. in that other object
48
49(... probably be a custom metaclass)
8b59f8d6 50
8a157bab 51- subtype $anon_subtype => where { ... }
52
53[22:56] stevan sub mst_doesnt_like_to_type { (shift)->meta->attr->type_contstraint }
54[22:57] mst err
55[22:57] stevan :P
56[22:57] stevan are you wanting to reuse it or something?
57[22:57] stevan my $subtype = subtype 'Something' => where { ... };
d03bd989 58[22:58] stevan then you can do isa => $subtype
8a157bab 59[22:58] mst but I can't subtype it again
d03bd989 60[22:59] stevan mst: ahhh...
8a157bab 61[22:59] mst well, I can. but it suddenly gets very "long way round" ish
62[23:00] stevan my $constraint = Moose::Meta::TypeConstraint->new(
63[23:00] stevan name => $name || '__ANON__',
d03bd989 64[23:00] stevan parent => $parent,
65[23:00] stevan constraint => $check,
66[23:00] stevan message => $message,
8a157bab 67[23:00] stevan );
68[23:00] stevan yeah thats kinda the long way
69[23:00] stevan mst: what would you like it to be?
70[23:00] mst $parent = find_type_constraint($parent) if defined $parent;
71[23:00] mst if $parent is already a type constraint
72[23:00] mst skip that bit
73[23:00] stevan hmm
74[23:00] mst should be all you need to change
75[23:00] stevan yeah
d03bd989 76[23:01] stevan so you can then say
8a157bab 77[23:01] stevan subtype $anon => where { ... };
78[23:01] mst right
79[23:01] stevan ok
80
f90e052d 81- local coerce
82
83[13:16] mst stevan: slight problem with coerce
84[13:16] mst I only get to declare it once
85[13:17] mst so if I'm trying to declare it cast-style per-source-class rather than per-target-class
86[13:17] mst I am extremely screwed
87[13:17] stevan yes
d03bd989 88[13:17] stevan they are not class specific
f90e052d 89[13:18] stevan they are attached to the type constraint itself
90[13:18] * stevan ponders anon-coercion-metaobjects
91[13:18] mst yes, that's fine
92[13:19] mst but when I declare a class
93[13:19] mst I want to be able to say "this class coerces to X type via <this>"
94[13:19] stevan yeah something like that
95[13:19] stevan oh,.. hmm
96[13:20] stevan sort of like inflate/deflate?
97[13:20] stevan around the accessors?
98[13:25] * bluefeet has quit (Remote host closed the connection)
99[13:27] mst no
100[13:27] mst nothing like that
101[13:27] mst like a cast
102[13:31] mst stevan: $obj->foo($bar); where 'foo' expects a 'Foo' object
103[13:31] mst stevan: is effectively <Foo>$bar, right?
104[13:32] mst stevan: I want to be able to say in package Bar
105[13:32] mst stevan: coerce_to 'Foo' via { ... };
106[13:32] mst etc.
d03bd989 107[13:53] stevan hmm
108
109
8b59f8d6 110-------------------------------------------------------------------------------
111TO PONDER
112-------------------------------------------------------------------------------
113
114- Moose "strict" mode
115
116use Moose 'strict'; This would allow us to have all sort of expensive tests
d03bd989 117which can be turned off in prod.
118
8b59f8d6 119- Moose::Philosophy.pod
120
121To explain Moose from a very high level
122
687e52bb 123- moosedoc
8b59f8d6 124
687e52bb 125We certainly have enough meta-information to make pretty complete POD docs.
d03bd989 126
127
128