App-Cmdline
view release on metacpan or search on metacpan
pop @db_options;
return
@db_options,
[ 'latitude|y=s' => "geographical latitude" ],
[ 'longitude|x=s' => "geographical longitude" ],
$self->composed_of (
'App::Cmdline::Options::Basic',
);
}
The last example looks a bit inconvenient. And you do not need to do it
that way - because the "composed_of" method accepts also any arrayrefs,
ignoring them and just passing them to its return value. That's why you
really can call this method only once and not to be bothered with the
hashref at the end. Here is an example how you can combine class names
(predefined sets) with your own option specification and/or usage
separators (the empty arrayrefs):
return
[ 'check|c' => "only check the configuration" ],
[],
docs/App-Cmdline.html view on Meta::CPAN
pop @db_options;
return
@db_options,
[ 'latitude|y=s' => "geographical latitude" ],
[ 'longitude|x=s' => "geographical longitude" ],
$self->composed_of (
'App::Cmdline::Options::Basic',
);
}</pre>
<p>The last example looks a bit inconvenient. And you do not need to do it that way - because the <code>composed_of</code> method accepts also any arrayrefs, ignoring them and just passing them to its return value. That's why you really can call ...
<pre> return
[ 'check|c' => "only check the configuration" ],
[],
$self->composed_of (
'App::Cmdline::Options::DB',
[ 'show|s' => "show database access properties" ],
[],
'App::Cmdline::Options::Basic',
);</pre>
lib/App/Cmdline.pm view on Meta::CPAN
pop @db_options;
return
@db_options,
[ 'latitude|y=s' => "geographical latitude" ],
[ 'longitude|x=s' => "geographical longitude" ],
$self->composed_of (
'App::Cmdline::Options::Basic',
);
}
The last example looks a bit inconvenient. And you do not need to do
it that way - because the C<composed_of> method accepts also any
arrayrefs, ignoring them and just passing them to its return
value. That's why you really can call this method only once and not to
be bothered with the hashref at the end. Here is an example how you
can combine class names (predefined sets) with your own option
specification and/or usage separators (the empty arrayrefs):
return
[ 'check|c' => "only check the configuration" ],
[],
( run in 0.498 second using v1.01-cache-2.11-cpan-64827b87656 )