App-Cmdline

 view release on metacpan or  search on metacpan

README  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 "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&#39;s why you really can call ...

<pre>    return
        [ &#39;check|c&#39; =&#62; &#34;only check the configuration&#34;  ],
        [],
        $self-&#62;composed_of (
            &#39;App::Cmdline::Options::DB&#39;,
            [ &#39;show|s&#39; =&#62; &#34;show database access properties&#34;  ],
            [],
            &#39;App::Cmdline::Options::Basic&#39;,
        );</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.473 second using v1.01-cache-2.11-cpan-64827b87656 )