GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
App::CLI::Command(3) User Contributed Perl Documentation App::CLI::Command(3)

App::CLI::Command - Base class for App::CLI commands

    package MyApp::List;
    use base qw(App::CLI::Command);

    use constant options => (
        'verbose'   => 'verbose',
        'n|name=s'  => 'name',
    );

    sub run {
        my ( $self, $arg ) = @_;

        print "verbose" if $self->{verbose};

        my $name = $self->{name}; # get arg following long option --name

        # anything you want this command do
    }

    # See App::CLI for information of how to invoke (sub)command.

subcommand()

    return old genre subcommand of $self;

cascading()

Return instance of cascading subcommand invoked if it was listed in your constant subcommands.

cascadable()

Return package name of subcommand if the subcommand invoked is in your constant subcommands, otherwise, return "undef".

app

Return the object referring to the current app.

brief_usage ($file)

Display a one-line brief usage of the command object. Optionally, a file could be given to extract the usage from the POD.

usage ($want_detail)

Display usage. If $want_detail is true, the "DESCRIPTION" section is displayed as well.

loc_text $text

Localizes the body of (formatted) text in $text and returns the localized version.

filename

Return the filename for the command module.

App::CLI, Getopt::Long

Chia-liang Kao <clkao@clkao.org>

Cornelius Lin <cornelius.howl@gmail.com>

Shelling <navyblueshellingford@gmail.com>

Paul Cochrane <paul@liekut.de> (current maintainer)

Copyright 2005-2006 by Chia-liang Kao <clkao@clkao.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See <http://www.perl.com/perl/misc/Artistic.html>

2018-05-14 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.