Eric Wilhelm wrote:

What about?

  use OurMoose;

Which would be supported by:
  package OurMoose;
  use Moose;
  use Moose::Policy 'My::Moose::Policy';
  pass_thru(1);

It seems that the caller() stuff in the Moose API generally limits the ability to wrap it. It would be nice to be able to insert a thin layer
to project-globally control mooseness.  Thoughts?

I'm not sure I understand how pass_thru would work...but I like the end result! :)

Stevan Little wrote:


My concern with allowing Moose to be overridden is that it either it;

locks me into the internals of Moose.pm (not only can I not change it, I cant improve it or extend it)

OR

causes simple updates to break your *entire* system in one fell swoop :P

I don't like either option actually. To be honest, 99% of all the problems people will try to solve by wrapping Moose can be solved by some other means (custom metaclasses, using roles instead of classes, etc).

I can see why you would not want to make Moose overly subclassable. Especially at this early stage, you need to have the freedom to muck with internals and keep the supported API small.

But I don't see how Eric's suggestion opens things up any more than standard Moose::Policy usage does. Isn't his syntax functionally equivalent to including a 'use Moose::Policy' in every class in a project, just more sugary? Or are you saying that you would like to discourage overuse of Moose::Policy itself?

Jon

Reply via email to