On Thu, Aug 20, 2009 at 12:53:17AM -0400, Chris Prather wrote: > On Thu, Aug 20, 2009 at 12:26 AM, Elliot Shank<[email protected]> wrote: > > If you uncomment the one line in the code below, you get a "Illegal > > inherited options => (getopt_name)" error. Is there any way around this? > > Yes, but it isn't pretty. Moose::Meta::Attribute defines a set of > "legal_options_for_inheritance", and getopt_name isn't one of them > (obviously since Moose doesn't even know about it). You need to > override the legal_options_for_inheritance method from > Moose::Meta::Attribute and add that method to the allowed methods ... > or complain to #moose-dev about why we have a hard coded list with no > easy way to override it ... complaining with a topic/ branch to show > how easy a solution would be to implement and some docs and tests will > probably work best and earn you a frosty beverage of your choice. > > -Chris > > It's late and I can't really come up with a better solution right now, > perhaps someone who's less tired will have one?
Well, obviously, if it's meant to work with overriding, then mx-getopt or whatever should be overriding legal_options_for_inheritance in the metaclass. Getting rid of legal_options_for_inheritance altogether would be an alternative solution too though(: -doy
