r42219 - in /branches/upstream/libapp-cmd-perl/current: ./ lib/App/ lib/App/Cmd/ lib/App/Cmd/Command/ lib/App/Cmd/Subdispatch/

ryan52-guest at users.alioth.debian.org ryan52-guest at users.alioth.debian.org
Thu Aug 20 21:20:24 UTC 2009


Author: ryan52-guest
Date: Thu Aug 20 21:20:17 2009
New Revision: 42219

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=42219
Log:
[svn-upgrade] Integrating new upstream version, libapp-cmd-perl (0.206)

Modified:
    branches/upstream/libapp-cmd-perl/current/Changes
    branches/upstream/libapp-cmd-perl/current/META.yml
    branches/upstream/libapp-cmd-perl/current/Makefile.PL
    branches/upstream/libapp-cmd-perl/current/lib/App/Cmd.pm
    branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/ArgProcessor.pm
    branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Command.pm
    branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Command/commands.pm
    branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Command/help.pm
    branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Simple.pm
    branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Subdispatch.pm
    branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Subdispatch/DashedStyle.pm

Modified: branches/upstream/libapp-cmd-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapp-cmd-perl/current/Changes?rev=42219&op=diff
==============================================================================
--- branches/upstream/libapp-cmd-perl/current/Changes (original)
+++ branches/upstream/libapp-cmd-perl/current/Changes Thu Aug 20 21:20:17 2009
@@ -1,4 +1,7 @@
 Revision history for App-Cmd
+
+0.206     2009-08-19
+          add a ->description to commands (thanks Jerome Quelin)
 
 0.205     2009-08-18
           add the long-missing arg0 and full_arg0 accessors (resolves 35528)

Modified: branches/upstream/libapp-cmd-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapp-cmd-perl/current/META.yml?rev=42219&op=diff
==============================================================================
--- branches/upstream/libapp-cmd-perl/current/META.yml (original)
+++ branches/upstream/libapp-cmd-perl/current/META.yml Thu Aug 20 21:20:17 2009
@@ -21,7 +21,7 @@
     - t
     - xt
 requires:
-  Getopt::Long::Descriptive: 0.06
+  Getopt::Long::Descriptive: 0.075
   Module::Pluggable::Object: 0
   Sub::Exporter: 0.975
   Sub::Install: 0
@@ -29,4 +29,4 @@
 resources:
   license: http://dev.perl.org/licenses/
   repository: http://github.com/rjbs/app-cmd
-version: 0.205
+version: 0.206

Modified: branches/upstream/libapp-cmd-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapp-cmd-perl/current/Makefile.PL?rev=42219&op=diff
==============================================================================
--- branches/upstream/libapp-cmd-perl/current/Makefile.PL (original)
+++ branches/upstream/libapp-cmd-perl/current/Makefile.PL Thu Aug 20 21:20:17 2009
@@ -2,7 +2,7 @@
 
 all_from('lib/App/Cmd.pm');
 
-requires('Getopt::Long::Descriptive' => 0.06);  # numerous bug fixes
+requires('Getopt::Long::Descriptive' => 0.075); # leader_text, option_text
 requires('Module::Pluggable::Object' => 0.00);
 requires('Sub::Exporter'             => 0.975); # curry_method
 requires('Sub::Install'              => 0.00);  # minimum unknown

Modified: branches/upstream/libapp-cmd-perl/current/lib/App/Cmd.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapp-cmd-perl/current/lib/App/Cmd.pm?rev=42219&op=diff
==============================================================================
--- branches/upstream/libapp-cmd-perl/current/lib/App/Cmd.pm (original)
+++ branches/upstream/libapp-cmd-perl/current/lib/App/Cmd.pm Thu Aug 20 21:20:17 2009
@@ -47,11 +47,11 @@
 
 =head1 VERSION
 
-version 0.205
-
-=cut
-
-our $VERSION = '0.205';
+version 0.206
+
+=cut
+
+our $VERSION = '0.206';
 
 =head1 SYNOPSIS
 

Modified: branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/ArgProcessor.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/ArgProcessor.pm?rev=42219&op=diff
==============================================================================
--- branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/ArgProcessor.pm (original)
+++ branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/ArgProcessor.pm Thu Aug 20 21:20:17 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-version 0.205
+version 0.206
 
 =cut
 
-our $VERSION = '0.205';
+our $VERSION = '0.206';
 
 sub _process_args {
   my ($class, $args, @params) = @_;

Modified: branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Command.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Command.pm?rev=42219&op=diff
==============================================================================
--- branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Command.pm (original)
+++ branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Command.pm Thu Aug 20 21:20:17 2009
@@ -11,11 +11,11 @@
 
 =head1 VERSION
 
-version 0.205
-
-=cut
-
-our $VERSION = '0.205';
+version 0.206
+
+=cut
+
+our $VERSION = '0.206';
 
 use Carp ();
 
@@ -217,6 +217,18 @@
   return $result || "(unknown)";
 }
 
+=head2 description
+
+This method should be overridden to provide full option description. It
+is used by the help command.
+
+If not overridden, it returns an empty string.
+
+=cut
+
+sub description { '' }
+
+
 =head1 AUTHOR AND COPYRIGHT
 
 See L<App::Cmd>.

Modified: branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Command/commands.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Command/commands.pm?rev=42219&op=diff
==============================================================================
--- branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Command/commands.pm (original)
+++ branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Command/commands.pm Thu Aug 20 21:20:17 2009
@@ -11,11 +11,11 @@
 
 =head1 VERSION
 
-version 0.205
+version 0.206
 
 =cut
 
-our $VERSION = 0.205;
+our $VERSION = 0.206;
 
 =head1 DESCRIPTION
 
@@ -85,4 +85,9 @@
   return (\@head, \@tail);
 }
 
+sub description {
+"This command will list all of commands available and their abstracts.\n";
+}
+
+
 1;

Modified: branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Command/help.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Command/help.pm?rev=42219&op=diff
==============================================================================
--- branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Command/help.pm (original)
+++ branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Command/help.pm Thu Aug 20 21:20:17 2009
@@ -11,22 +11,27 @@
 
 =head1 VERSION
 
-version 0.205
+version 0.206
 
 =cut
 
-our $VERSION = '0.205';
+our $VERSION = '0.206';
 
 =head1 DESCRIPTION
 
 This command plugin implements a "help" command.  This command will either list
 all of an App::Cmd's commands and their abstracts, or display the usage screen
-for a subcommand.
+for a subcommand with its description.
 
 =cut
 
+sub command_names { qw/help --help -h -?/ }
 
-sub command_names { qw/help --help -h -?/ }
+sub description {
+"This command will either list all of the application commands and their
+abstracts, or display the usage screen for a subcommand with its
+description.\n"
+}
 
 sub run {
   my ($self, $opts, $args) = @_;
@@ -51,7 +56,17 @@
     $self->app->execute_command( $self->app->_prepare_command("commands") );
   } else {
     my ($cmd, $opt, $args) = $self->app->prepare_command(@$args);
-    print $cmd->_usage_text;
+
+    local $@;
+    my $desc = $cmd->description;
+    $desc = "\n$desc" if length $desc;
+
+    my $ut = join "\n",
+      eval { $cmd->usage->leader_text },
+      $desc,
+      eval { $cmd->usage->option_text };
+
+    print $ut;
   }
 }
 

Modified: branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Simple.pm?rev=42219&op=diff
==============================================================================
--- branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Simple.pm (original)
+++ branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Simple.pm Thu Aug 20 21:20:17 2009
@@ -5,7 +5,7 @@
 use App::Cmd::Command;
 BEGIN { our @ISA = 'App::Cmd::Command' }
 
-our $VERSION = '0.205';
+our $VERSION = '0.206';
 
 use App::Cmd;
 use Sub::Install;

Modified: branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Subdispatch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Subdispatch.pm?rev=42219&op=diff
==============================================================================
--- branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Subdispatch.pm (original)
+++ branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Subdispatch.pm Thu Aug 20 21:20:17 2009
@@ -13,11 +13,11 @@
 
 =head1 VERSION
 
-version 0.205
+version 0.206
 
 =cut
 
-our $VERSION = '0.205';
+our $VERSION = '0.206';
 
 =head1 METHODS
 

Modified: branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Subdispatch/DashedStyle.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Subdispatch/DashedStyle.pm?rev=42219&op=diff
==============================================================================
--- branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Subdispatch/DashedStyle.pm (original)
+++ branches/upstream/libapp-cmd-perl/current/lib/App/Cmd/Subdispatch/DashedStyle.pm Thu Aug 20 21:20:17 2009
@@ -11,11 +11,11 @@
 
 =head1 VERSION
 
-version 0.205
+version 0.206
 
 =cut
 
-our $VERSION = '0.205';
+our $VERSION = '0.206';
 
 =head1 METHODS
 




More information about the Pkg-perl-cvs-commits mailing list