in reply to Why "no Moose?"

To prevent someone from doing YourModule->has_field() or $your_object->has_field();, though I'm hard pressed to find a situation where that would occur. (Automatic documentation generator and other forms of code introspection, I suppose.)

Replies are listed 'Best First'.
Re^2: Why "no Moose?"
by stvn (Monsignor) on Jan 28, 2009 at 21:33 UTC

    You would be surprised how many people I have seen try to do this:

    MyMooseModule->has(thing => ( ... ));
    as a way to dynamically extend a class at runtime, instead of just (correctly) using the MOP
    MyMooseModule->meta->add_attribute(thing => ( ... ));
    I suspect to some degree it is because people are too used to the older perl OO frameworks like Class::Accessor which forced you to inherit from itself and therefore made things like $some_object->mk_accessor('foo') possible, even though that is evil and wrong ;)

    -stvn