Re: General Moose/Perl OO question

[email protected] (Dave Rolsky)
Newsgroups perl.moose
Message-ID <[email protected]>
On Thu, 9 Feb 2012, [email protected] wrote:

> This begs a question: what to put in the main program if the class knows all it needs to run?
> The usual pattern is:
>
>
> use MyMooseClass;
>
>
> my $obj = MyMooseClass->new_with_options;
>
>
> $obj->run; # Or something alike
>
>
> This looks like redundant.
>
>
> I was thinking about using
> perl -MMyMooseClass ...
>
>
> This of course assumes that MyMooseClass is a singleton.
>
>
> Any thoughts?

Having an executable is useful. It's like every other Unix program, it's 
in the path, it's what people expect.

Writing this executable takes about 10 seconds and you never need to 
change it. Why not include it?


-dave

/*============================================================
http://VegGuide.org               http://blog.urth.org
Your guide to all that's veg      House Absolute(ly Pointless)
============================================================*/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.