Home  |  Linux  | Mysql  | PHP  | XML
Date:Thu Feb  9 19:06:01 2012
Subject:Re: General Moose/Perl OO question
On Thu, 9 Feb 2012, shtil@comcast.net 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)
============================================================*/
Navigate in group perl.moose at sever nntp.perl.org
Previous Next





  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants