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




Reply via email to