develooper Front page | perl.moose | Postings from December 2009

MooseX::App:Cmd question

Thread Next
From:
Rolf Schaufelberger
Date:
December 15, 2009 04:28
Subject:
MooseX::App:Cmd question
Message ID:
9C998F08-B7A8-493F-91CF-E00847786478@plusw.de
Hi, 

how can  I  implement  several commands (= subclasses ) and each subclass have its own parameters ? 

Say I have:
MyApp::Command     Base class    defines param   B1  and B2 as required
MyApp::Command::CmdA               defines param  A1 as required
MyApp:Command::CmdX                 defines param X1  as required

and my script     site-config.pl:
#!/usr/bin/perl
use MyApp::Comand -run


now when I call 
site-config.pl   CmdA   -B1=bla -B2=foo -A1=bar 

I get an error complaining about  missing mandatory parameter  X1 

but X1 is not needed to execute CmdA

regards
Rolf Schaufelberger





Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About