changelog
[gitmo/Moose.git] / TODO
diff --git a/TODO b/TODO
index 53134b6..a36cf24 100644 (file)
--- a/TODO
+++ b/TODO
@@ -2,7 +2,13 @@
 
 === RT Tickets
 
-RT#67731 - Union types reports spurious parent types - https://rt.cpan.org/Ticket/Display.html?id=67731
+RT#59478/RT#63000 - 0+ overload causes NV conversion on == on perls before
+5.14 - this causes comparisons to fail when the number can't fit in an NV
+without precision loss. I'd like to fix this in a more general way (forcing
+anyone else who might be using == on tc objects to do weird things isn't very
+good), although it's hard to test to see what actually works.
+
+== Todo for 2.0600
 
 === Revise MetaRole API to reunify class/role metaroles:
 
@@ -35,13 +41,7 @@ Moose extensions that work by calling Moose->init_meta(metaclass =>
 deprecated, so they can be removed later (this should fix the issues with
 init_meta generation in Moose::Exporter, see RT51561)
 
-=== Register implicitly created class/role types
-
-When you do has foo => (isa => 'Bar'), it returns a class_type for Bar, but
-doesn't register it. This means that later you can declare "subtype 'Bar', as
-'Str', ..." and it'll work, and later instances of the 'Bar' type will use that
-one. We should register the implicitly created ones so that trying to redefine
-it after it's used throws an error.
+This needs to wait until the previous fix gets in, since it will hopefully eliminate the need to write custom init_meta methods entirely.
 
 === Attributes in roles need to be able to participate in role composition
 
@@ -84,9 +84,17 @@ namespace::autoclean to not break things.
 
 Also, MooseX::Role::WithOverloading should probably be cored.
 
+This should probably also wait for the metarole unification fix, to avoid the
+::WithOverloading stuff being too insane.
+
 
 == Todo for later
 
+=== has +foo in roles
+
+There's no actual reason for this not to work, and it gets asked often enough
+that we really should just do it at some point.
+
 === Actual API for metaclass extensions
 
 Right now, the only way to bundle multiple metaclass traits is via
@@ -135,6 +143,34 @@ that people would think to use first is the method that they actually mean.
 Something like renaming find_method_by_name to find_method, and get_method to
 find_local_method or something along those lines.
 
+=== use Sub::Identify instead of doing our own thing with get_code_info
+
+No idea why we stopped using Sub::Identify in the past, but there's no reason
+not to do this. We have a bug fix in our version (the isGV_with_GP thing), so
+this should be submitted to Sub::Identify first.
+
+=== Move method modifiers out to an external module
+
+Class::Method::Modifiers uses a different method for doing method modifiers,
+which I'm not sure why we aren't using in Moose right now. Optionally using
+Class::Method::Modifiers::Fast would be even better - it uses Data::Util to
+implement XS method modifiers, which could help things a lot.
+
+=== Move type constraints out to an external module
+
+There's nothing about our type constraint system that requires being tied to
+Moose - it's conceptually an entirely separate system that Moose just happens
+to use. Splitting it out into its own thing (that Moose could extend to add
+things like role types) would make things conceptually a lot cleaner, and would
+let people interested in just the type system have that.
+
+=== Merge Class::MOP and Moose
+
+This is a long term goal, but would allow for a lot of things to be cleaned up.
+There's a bunch of stuff that's duplicated, and other stuff that's not
+implemented as well as it could be (Class::MOP::Method::Wrapped should be a
+role, for instance).
+
 
 == Things to contemplate
 
@@ -169,6 +205,122 @@ It seems to make sense, since otherwise you're violating the role's API
 contract.
 
 
+== TODO test summary
+
+Note that some of these are fairly old, and may not be things we actually want
+to do anymore.
+
+=== t/basics/basic_class_setup.t
+
+Imports aren't automatically cleaned. Need to think about bringing
+namespace::autoclean functionality into core.
+
+=== t/bugs/create_anon_recursion.t
+
+Loading Moose::Meta::Class (or probably a lot of other metaclasses) before
+loading Moose or Class::MOP causes issues (the bootstrapping gets confused).
+
+=== t/bugs/handles_foreign_class_bug.t
+
+There should be a warning when delegated methods override 'new' (and possibly
+others?).
+
+=== t/bugs/role_caller.t
+
+Role methods should be cloned into classes on composition so that using
+caller(0) in a role method uses the class's package, not the role's.
+
+=== t/cmop/metaclass_incompatibility.t
+
+If a child class is created before a parent class, metaclass compatibility
+checks won't run on the child when the parent is created, and so the child
+could end up with an incompatible metaclass.
+
+=== t/cmop/modify_parent_method.t
+
+Modifying parent class methods after a child class has already wrapped them
+with a method modifier will cause the child class method to retain the original
+method that it wrapped, not the new one it was replaced with.
+
+=== t/immutable/inline_close_over.t
+
+Initializers and custom error classes still close over metaobjects.
+Initializers do it because the initializer has to be passed in the attribute
+metaobject as a parameter, and custom error classes can't be automatically
+inlined.
+
+=== t/metaclasses/moose_exporter_trait_aliases.t
+
+Renamed imports aren't cleaned on unimport. For instance:
+
+  package Foo;
+  use Moose has => { -as => 'my_has' };
+  no Moose;
+  # Foo still contains my_has
+
+=== t/metaclasses/reinitialize.t
+
+Special method types can't have method metaroles applied. Applying a method
+metarole to a class doesn't apply that role to things like constructors,
+accessors, etc.
+
+=== t/roles/compose_overloading.t
+
+Overload methods aren't composed during role composition (this is detailed
+above - Add overloading support).
+
+=== t/roles/method_modifiers.t
+
+Method modifiers in roles don't support the regex form of method selection.
+
+=== t/roles/role_compose_requires.t
+
+Accessors for attributes defined in roles don't satisfy role method
+requirements (this is detailed above - Attributes in roles need to be able to
+participate in role composition).
+
+=== t/todo_tests/exception_reflects_failed_constraint.t
+
+Type constraint failures should indicate which ancestor constraint failed -
+subtype 'Foo', as 'Str', where { length < 5 } should mention Str when passed an
+arrayref, but not when passed the string "ArrayRef".
+
+=== t/todo_tests/moose_and_threads.t
+
+On 5.8, the type constraint name parser isn't thread safe.
+
+=== t/todo_tests/replacing_super_methods.t
+
+Modifying parent class methods after a child class has already wrapped them
+with a override will cause 'super' in the child class to call the original
+parent class method, not the one it was overridden with.
+
+=== t/todo_tests/required_role_accessors.t
+
+Role attribute accessors don't satisfy requires from roles they consume.
+
+=== t/todo_tests/role_insertion_order.t
+
+Roles don't preserve attribute insertion_order.
+
+=== t/todo_tests/various_role_features.t
+
+* Role attribute accessors don't satisfy requires from roles they consume.
+* Role combination should produce a conflict when one role has an actual method
+  and the other role has an accessor.
+* Role attribute accessors should not override methods in the class the role is
+  applied to.
+* Role attribute accessors should be delegated when a class does
+  handles => 'Role'.
+* Delegating to a role doesn't make $class->does('Role') true.
+* Method modifier in a role doesn't create a method requirement.
+* Role->meta->has_method('attr_accessor') is false.
+
+=== t/type_constraints/type_names.t
+
+Type constraint object constructors don't validate the type name provided.
+
+
 == Old todo (does anyone look at this?)
 
 -------------------------------------------------------------------------------