Agreed, it should check length because there is no reason that '' would be valid method name or identifier.

However, my concern is that this may work for Dan's basic example/use- case, but there are other places where we use these methods and I would want to be sure that it worked there as well. Places like delegation, role composition, etc.

I have no problem changing this as long as we can be sure it will work 100%, which means that we need a bunch of tests to work with.

- Stevan

On Apr 13, 2009, at 1:44 PM, Hans Dieter Pearcey wrote:

On Mon, Apr 13, 2009 at 12:38:08PM -0500, Dan Harbin wrote:
I'd like for the following validation in the Class::MOP::Attribute
constructor to be removed:

  (defined $name && $name)
  || confess "You must provide a name for the attribute";

Is there any reason Class::MOP::Attribute should enforce this?

it probably should be

 defined $name && length $name

hdp.

Reply via email to