Re: General Moose/Perl OO question
[email protected] (Tomas Doran)
| Newsgroups | perl.moose |
|---|---|
| Message-ID | <[email protected]> |
On 9 Feb 2012, at 18:21, [email protected] wrote: > > I was thinking about using > perl -MMyMooseClass ... > > > This of course assumes that MyMooseClass is a singleton. > > > Any thoughts? package MyMooseClass; ... stuff ... __PACKAGE__->meta->make_immutable; __PACKAGE__->new_with_options->run unless caller; 1; and then you can just run it like a script, or reuse it like a module. Although I tend to agree with Dave's suggestion that providing a 3 line binary really isn't a lot of effort.. Cheers t0m