Re: Meta::Attribute::Native::Trait vs MooseX::AttributeHelpers

2009-10-27 Thread Sartak
On Tue, Oct 27, 2009 at 1:41 PM, Evan Carroll  wrote:
> It is hard to have these discussions being banned from IRC, but maybe
> - beyond a notice in MX:AH deprecation - some functionality notifying
> the user of an API change is required?

No API change is required. Old code can continue to use MXAH. New code
should use native attributes.

> Like something in MX:AH that
> when used with a Moose > .90 the attribute traits would output a nice
> warning message.
>
> Warning the functionality of MooseX::AttributeHelpers has been moved
> to core, please reference "Moose::Meta::Attribute::Native" for the new
> API.

I don't see any reason to start warning about it. The code will
continue to work fine. MXAH is not really deprecated (we're not going
to remove it from CPAN), it's more just superseded.

> I've often thought that warnings were better explicit and overly
> verbose in libraries and disabled via -X by the end user, but maybe an
> env DEVELOPMENT flag would be just as useful. There are at least a few
> examples of where as a developer I was stung with stuff that was
> currently supported but deprecated, supported but retarded, or
> implemented but unsupported.
>
> --
> Evan Carroll
> System Lord of the Internets
> http://www.evancarroll.com
>

Shawn


Re: Meta::Attribute::Native::Trait vs MooseX::AttributeHelpers

2009-10-27 Thread Evan Carroll
It is hard to have these discussions being banned from IRC, but maybe
- beyond a notice in MX:AH deprecation - some functionality notifying
the user of an API change is required? Like something in MX:AH that
when used with a Moose > .90 the attribute traits would output a nice
warning message.

Warning the functionality of MooseX::AttributeHelpers has been moved
to core, please reference "Moose::Meta::Attribute::Native" for the new
API.

I've often thought that warnings were better explicit and overly
verbose in libraries and disabled via -X by the end user, but maybe an
env DEVELOPMENT flag would be just as useful. There are at least a few
examples of where as a developer I was stung with stuff that was
currently supported but deprecated, supported but retarded, or
implemented but unsupported.

-- 
Evan Carroll
System Lord of the Internets
http://www.evancarroll.com


Re: Meta::Attribute::Native::Trait vs MooseX::AttributeHelpers

2009-10-27 Thread Jurgen Pletinckx
2009/10/26 Evan Carroll :
> I just noticed core Moose has traits now for Arrays (and other base
> types). How does this compare with the more traditional
> MX::AttributeHelpers metaclasses? There seems to be an undocumented
> overlap of functionality and I'm confused which one I should use. Any
> advice appreciated.

M::M::A::N is the new and improved MX::AH. It has been brought into
the core from the wasteland of the MX namespace. Ahem.

See also 
http://search.cpan.org/~drolsky/Moose-0.92/lib/Moose/Manual/Delta.pod#Version_0.89_01

It seems that a statement to that effect in the documentation for
the actual modules would be useful. Where did I leave my stack
of tuits?

-- 
Jurgen Pletinckx


Meta::Attribute::Native::Trait vs MooseX::AttributeHelpers

2009-10-27 Thread Evan Carroll
I just noticed core Moose has traits now for Arrays (and other base
types). How does this compare with the more traditional
MX::AttributeHelpers metaclasses? There seems to be an undocumented
overlap of functionality and I'm confused which one I should use. Any
advice appreciated.

Here are the two links on CPAN.
http://search.cpan.org/~drolsky/MooseX-AttributeHelpers-0.22/lib/MooseX/AttributeHelpers/MethodProvider/Array.pm
http://search.cpan.org/~drolsky/Moose-0.92/lib/Moose/Meta/Attribute/Native/Trait/Array.pm

Thanks

-- 
Evan Carroll
System Lord of the Internets
http://www.evancarroll.com