On Thu, Jan 15, 2009 at 8:46 AM, Elliot Shank <p...@galumph.com> wrote: > Is there a way to avoid the duplication here: > > use Foo (); > with 'Foo'; > > Is there a way to get "with" (or something similar) to do a require? >
This works for me. If you're using a really old version of Moose you may need to upgrade. perl -Moose -e 'with "MooseX::Getopt"; Class->new_with_options' # doesn't explode :) Shawn