Awesome work guys, but I hate the name, ... Native?!?! wtf?
;)
On Jul 10, 2009, at 6:28 PM, Hans Dieter Pearcey wrote:
doy++ did a bunch of cleanup in the attribute_helpers branch, and I
followed
after. So far:
Moose::AttributeHelpers::Trait::X became
Moose::Meta::Attribute::Trait::Native::X. Bag is gone.
Moose::AttributeHelpers became Moose::Attribute::Native -- all this
module does
is install the register_implementation subs for trait shortnames
(Bool, etc.);
it doesn't actually load the traits. This is because:
Moose.pm uses Moose::Attribute::Native, meaning that all the Native
trait
shortnames are available by default.
Tests got renamed and minorly cleaned up.
Remaining to do:
Documentation needs to be consolidated in the Trait::Native::X
modules, and the
MethodProviders need to be explicitly undocumented.
Moose::Attribute::Native's documentation needs editing. We decided
today on
IRC that it made the most sense as a general overview page for the
Native
traits, i.e. something we can point to from Manual::Attributes and
Manual::Delegation.
Put off for future consideration:
Native traits could be automatically applied to attributes based on
their type
constraints, rather than applying traits that supply a default type
constraint.
e.g. (isa => Str) could apply the String trait, rather than (traits
=> ['String'])
implying the Str TC. We decided that this isn't worth waiting to
core Native
traits for, and that we can always add it later, since the primary
feature of
Native traits is to enable 'handles' for native data types, and no
one's going
to have already been using 'handles' with a HashRef or Str.
Questions:
Should we stuff more documentation into Moose::Attribute::Native,
and leave the
Trait::Native::X modules as stubs that point to it? Since many of
these
modules are almost entirely "X: works like the builtin function X",
it seems
silly to make people have to look at a bunch of different manpages.
Thoughts?
(At that point it may also make more sense to rename it to something
like
Moose::Manual::Attributes::Native.)
hdp.