r65774 - in /trunk/libapp-cmd-perl: ./ debian/ lib/App/ lib/App/Cmd/ lib/App/Cmd/Command/ lib/App/Cmd/Subdispatch/
carnil at users.alioth.debian.org
carnil at users.alioth.debian.org
Sun Dec 12 07:50:29 UTC 2010
Author: carnil
Date: Sun Dec 12 07:50:19 2010
New Revision: 65774
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=65774
Log:
WAITS-FOR: libclass-load-perl
* New upstream release
* Add libclass-load-perl to (Build-)Depends(-Indep).
Modified:
trunk/libapp-cmd-perl/Changes
trunk/libapp-cmd-perl/META.json
trunk/libapp-cmd-perl/META.yml
trunk/libapp-cmd-perl/Makefile.PL
trunk/libapp-cmd-perl/README
trunk/libapp-cmd-perl/debian/changelog
trunk/libapp-cmd-perl/debian/control
trunk/libapp-cmd-perl/lib/App/Cmd.pm
trunk/libapp-cmd-perl/lib/App/Cmd/ArgProcessor.pm
trunk/libapp-cmd-perl/lib/App/Cmd/Command.pm
trunk/libapp-cmd-perl/lib/App/Cmd/Command/commands.pm
trunk/libapp-cmd-perl/lib/App/Cmd/Command/help.pm
trunk/libapp-cmd-perl/lib/App/Cmd/Plugin.pm
trunk/libapp-cmd-perl/lib/App/Cmd/Setup.pm
trunk/libapp-cmd-perl/lib/App/Cmd/Simple.pm
trunk/libapp-cmd-perl/lib/App/Cmd/Subdispatch.pm
trunk/libapp-cmd-perl/lib/App/Cmd/Subdispatch/DashedStyle.pm
trunk/libapp-cmd-perl/lib/App/Cmd/Tester.pm
trunk/libapp-cmd-perl/lib/App/Cmd/Tutorial.pod
Modified: trunk/libapp-cmd-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/Changes?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/Changes (original)
+++ trunk/libapp-cmd-perl/Changes Sun Dec 12 07:50:19 2010
@@ -1,4 +1,12 @@
Revision history for App-Cmd
+
+
+ classes are now loaded with Class::Load, which should avoid bugs
+ where classes are not succesfully loaded by program execution
+ continues anyway (thanks to Kent Fredric)
+
+ more checking is now done to ensure that plugins are members of the
+ correct base class (thanks, Kent Fredric)
0.309 2010-11-12
Modified: trunk/libapp-cmd-perl/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/META.json?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/META.json (original)
+++ trunk/libapp-cmd-perl/META.json Sun Dec 12 07:50:19 2010
@@ -4,7 +4,7 @@
"Ricardo Signes <rjbs at cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.102343, CPAN::Meta::Converter version 2.102400",
+ "generated_by" : "Dist::Zilla version 4.102345, CPAN::Meta::Converter version 2.102400",
"license" : [
"perl_5"
],
@@ -22,6 +22,7 @@
"runtime" : {
"requires" : {
"Carp" : 0,
+ "Class::Load" : "0.06",
"Data::OptList" : 0,
"File::Basename" : 0,
"Getopt::Long::Descriptive" : 0,
@@ -51,83 +52,83 @@
"url" : "git://git.codesimply.com/App-Cmd.git"
}
},
- "version" : "0.309",
+ "version" : "0.310",
"x_Dist_Zilla" : {
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::GatherDir",
"name" : "@RJBS/@Basic/GatherDir",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@RJBS/@Basic/PruneCruft",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@RJBS/@Basic/ManifestSkip",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@RJBS/@Basic/MetaYAML",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@RJBS/@Basic/License",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@RJBS/@Basic/Readme",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::ExtraTests",
"name" : "@RJBS/@Basic/ExtraTests",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@RJBS/@Basic/ExecDir",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@RJBS/@Basic/ShareDir",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"name" : "@RJBS/@Basic/MakeMaker",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@RJBS/@Basic/Manifest",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@RJBS/@Basic/TestRelease",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@RJBS/@Basic/ConfirmRelease",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@RJBS/@Basic/UploadToCPAN",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@RJBS/AutoPrereqs",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::Git::NextVersion",
@@ -137,27 +138,27 @@
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@RJBS/PkgVersion",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@RJBS/MetaConfig",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@RJBS/MetaJSON",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@RJBS/NextRelease",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@RJBS/PodSyntaxTests",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::Repository",
@@ -173,7 +174,7 @@
}
},
"name" : "@RJBS/TestMoreWithSubtests",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
@@ -203,22 +204,22 @@
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "4.102343"
+ "version" : "4.102345"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "4.102343"
+ "version" : "4.102345"
}
],
"zilla" : {
@@ -226,7 +227,7 @@
"config" : {
"is_trial" : 0
},
- "version" : "4.102343"
+ "version" : "4.102345"
}
}
}
Modified: trunk/libapp-cmd-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/META.yml?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/META.yml (original)
+++ trunk/libapp-cmd-perl/META.yml Sun Dec 12 07:50:19 2010
@@ -10,7 +10,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.31
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.102343, CPAN::Meta::Converter version 2.102400'
+generated_by: 'Dist::Zilla version 4.102345, CPAN::Meta::Converter version 2.102400'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -18,6 +18,7 @@
name: App-Cmd
requires:
Carp: 0
+ Class::Load: 0.06
Data::OptList: 0
File::Basename: 0
Getopt::Long::Descriptive: 0
@@ -31,69 +32,69 @@
perl: 5.006
resources:
repository: git://git.codesimply.com/App-Cmd.git
-version: 0.309
+version: 0.310
x_Dist_Zilla:
plugins:
-
class: Dist::Zilla::Plugin::GatherDir
name: '@RJBS/@Basic/GatherDir'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@RJBS/@Basic/PruneCruft'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@RJBS/@Basic/ManifestSkip'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@RJBS/@Basic/MetaYAML'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::License
name: '@RJBS/@Basic/License'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::Readme
name: '@RJBS/@Basic/Readme'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::ExtraTests
name: '@RJBS/@Basic/ExtraTests'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::ExecDir
name: '@RJBS/@Basic/ExecDir'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::ShareDir
name: '@RJBS/@Basic/ShareDir'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::MakeMaker
name: '@RJBS/@Basic/MakeMaker'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::Manifest
name: '@RJBS/@Basic/Manifest'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::TestRelease
name: '@RJBS/@Basic/TestRelease'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@RJBS/@Basic/ConfirmRelease'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@RJBS/@Basic/UploadToCPAN'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@RJBS/AutoPrereqs'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::Git::NextVersion
name: '@RJBS/Git::NextVersion'
@@ -101,23 +102,23 @@
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@RJBS/PkgVersion'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@RJBS/MetaConfig'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@RJBS/MetaJSON'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::NextRelease
name: '@RJBS/NextRelease'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@RJBS/PodSyntaxTests'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::Repository
name: '@RJBS/Repository'
@@ -129,7 +130,7 @@
phase: test
type: requires
name: '@RJBS/TestMoreWithSubtests'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::PodWeaver
name: '@RJBS/PodWeaver'
@@ -153,21 +154,21 @@
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: 4.102343
+ version: 4.102345
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: 4.102343
+ version: 4.102345
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: 0
- version: 4.102343
+ version: 4.102345
Modified: trunk/libapp-cmd-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/Makefile.PL?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/Makefile.PL (original)
+++ trunk/libapp-cmd-perl/Makefile.PL Sun Dec 12 07:50:19 2010
@@ -26,6 +26,7 @@
'NAME' => 'App::Cmd',
'PREREQ_PM' => {
'Carp' => '0',
+ 'Class::Load' => '0.06',
'Data::OptList' => '0',
'File::Basename' => '0',
'Getopt::Long::Descriptive' => '0',
@@ -37,7 +38,7 @@
'Sub::Install' => '0',
'Text::Abbrev' => '0'
},
- 'VERSION' => '0.309',
+ 'VERSION' => '0.310',
'test' => {
'TESTS' => 't/*.t'
}
Modified: trunk/libapp-cmd-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/README?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/README (original)
+++ trunk/libapp-cmd-perl/README Sun Dec 12 07:50:19 2010
@@ -1,7 +1,7 @@
This archive contains the distribution App-Cmd,
-version 0.309:
+version 0.310:
write command line apps with less suffering
Modified: trunk/libapp-cmd-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/debian/changelog?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/debian/changelog (original)
+++ trunk/libapp-cmd-perl/debian/changelog Sun Dec 12 07:50:19 2010
@@ -1,8 +1,15 @@
-libapp-cmd-perl (0.309-2) UNRELEASED; urgency=low
+libapp-cmd-perl (0.310-1) UNRELEASED; urgency=low
+
+ WAITS-FOR: libclass-load-perl
+ [ gregor herrmann ]
* Add libtest-simple-perl (>= 0.96) to Build-Depends-Indep.
- -- gregor herrmann <gregoa at debian.org> Sun, 21 Nov 2010 17:02:04 +0100
+ [ Salvatore Bonaccorso ]
+ * New upstream release
+ * Add libclass-load-perl to (Build-)Depends(-Indep).
+
+ -- Salvatore Bonaccorso <carnil at debian.org> Sun, 12 Dec 2010 08:49:32 +0100
libapp-cmd-perl (0.309-1) unstable; urgency=low
Modified: trunk/libapp-cmd-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/debian/control?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/debian/control (original)
+++ trunk/libapp-cmd-perl/debian/control Sun Dec 12 07:50:19 2010
@@ -2,7 +2,7 @@
Section: perl
Priority: optional
Build-Depends: debhelper (>= 7)
-Build-Depends-Indep: perl, libio-tiecombine-perl,
+Build-Depends-Indep: perl, libio-tiecombine-perl, libclass-load-perl,
libsub-install-perl, libsub-exporter-perl (>= 0.975),
libgetopt-long-descriptive-perl (>= 0.084), libstring-rewriteprefix-perl,
libtest-fatal-perl, libtest-simple-perl (>= 0.96)
@@ -17,8 +17,8 @@
Package: libapp-cmd-perl
Architecture: all
-Depends: ${perl:Depends}, ${misc:Depends}, libsub-install-perl,
- libsub-exporter-perl (>= 0.975),
+Depends: ${perl:Depends}, ${misc:Depends}, libclass-load-perl,
+ libsub-install-perl, libsub-exporter-perl (>= 0.975),
libgetopt-long-descriptive-perl (>= 0.084), libstring-rewriteprefix-perl
Description: Perl interface to write command line apps with less suffering
App::Cmd is intended to make it easy to write complex command-line
Modified: trunk/libapp-cmd-perl/lib/App/Cmd.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/lib/App/Cmd.pm?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/lib/App/Cmd.pm (original)
+++ trunk/libapp-cmd-perl/lib/App/Cmd.pm Sun Dec 12 07:50:19 2010
@@ -4,7 +4,7 @@
package App::Cmd;
BEGIN {
- $App::Cmd::VERSION = '0.309';
+ $App::Cmd::VERSION = '0.310';
}
use App::Cmd::ArgProcessor;
BEGIN { our @ISA = 'App::Cmd::ArgProcessor' };
@@ -12,7 +12,8 @@
use File::Basename ();
use Module::Pluggable::Object ();
-use Text::Abbrev;
+use Text::Abbrev ();
+use Class::Load ();
use Sub::Exporter -setup => {
collectors => {
@@ -33,7 +34,7 @@
{
my $base = $self->_default_command_base;
- eval "require $base; 1" or die $@;
+ Class::Load::load_class($base);
no strict 'refs';
push @{"$into\::ISA"}, $base;
}
@@ -61,23 +62,33 @@
arg0 => $base,
full_arg0 => $arg0,
};
-
+
bless $self => $class;
}
-
+
# effectively, returns the command-to-plugin mapping guts of a Cmd
# if called on a class or on a Cmd with no mapping, construct a new hashref
# suitable for use as the object's mapping
sub _command {
my ($self, $arg) = @_;
-
return $self->{command} if ref $self and $self->{command};
+
+ # TODO _default_command_base can be wrong if people are not using
+ # ::Setup and have no ::Command :(
+ #
+ # my $want_isa = $self->_default_command_base;
+ # -- kentnl, 2010-12
+ my $want_isa = 'App::Cmd::Command';
my %plugin;
for my $plugin ($self->_plugins) {
- eval "require $plugin" or die "couldn't load $plugin: $@"
- unless eval { $plugin->isa( $self->_default_command_base ) };
+ Class::Load::load_class($plugin);
+
+ die "$plugin is not a " . $want_isa
+ unless $plugin->isa($want_isa);
+
next unless $plugin->can("command_names");
+
foreach my $command (map { lc } $plugin->command_names) {
die "two plugins for command $command: $plugin and $plugin{$command}\n"
if exists $plugin{$command};
@@ -90,7 +101,7 @@
if ($self->allow_any_unambiguous_abbrev) {
# add abbreviations to list of authorized commands
- my %abbrev = abbrev keys %plugin;
+ my %abbrev = Text::Abbrev::abbrev( keys %plugin );
@plugin{ keys %abbrev } = @plugin{ values %abbrev };
}
@@ -138,7 +149,7 @@
my ($self, $plugin_name, $arg, $plugin_href) = @_;
unless ($arg->{"no_$plugin_name\_plugin"}) {
my $plugin = "App::Cmd::Command::$plugin_name";
- eval "require $plugin" or die "couldn't load $plugin: $@";
+ Class::Load::load_class($plugin);
for my $command (map { lc } $plugin->command_names) {
$plugin_href->{$command} ||= $plugin;
}
@@ -154,7 +165,7 @@
# prepare the command we're going to run...
my ($cmd, $opt, @args) = $self->prepare_command(@ARGV);
-
+
# ...and then run it
$self->execute_command($cmd, $opt, @args);
}
@@ -358,7 +369,7 @@
=head1 VERSION
-version 0.309
+version 0.310
=head1 SYNOPSIS
Modified: trunk/libapp-cmd-perl/lib/App/Cmd/ArgProcessor.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/lib/App/Cmd/ArgProcessor.pm?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/lib/App/Cmd/ArgProcessor.pm (original)
+++ trunk/libapp-cmd-perl/lib/App/Cmd/ArgProcessor.pm Sun Dec 12 07:50:19 2010
@@ -3,7 +3,7 @@
package App::Cmd::ArgProcessor;
BEGIN {
- $App::Cmd::ArgProcessor::VERSION = '0.309';
+ $App::Cmd::ArgProcessor::VERSION = '0.310';
}
# ABSTRACT: App::Cmd-specific wrapper for Getopt::Long::Descriptive
@@ -34,7 +34,7 @@
=head1 VERSION
-version 0.309
+version 0.310
=head1 AUTHOR
Modified: trunk/libapp-cmd-perl/lib/App/Cmd/Command.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/lib/App/Cmd/Command.pm?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/lib/App/Cmd/Command.pm (original)
+++ trunk/libapp-cmd-perl/lib/App/Cmd/Command.pm Sun Dec 12 07:50:19 2010
@@ -3,7 +3,7 @@
package App::Cmd::Command;
BEGIN {
- $App::Cmd::Command::VERSION = '0.309';
+ $App::Cmd::Command::VERSION = '0.310';
}
use App::Cmd::ArgProcessor;
BEGIN { our @ISA = 'App::Cmd::ArgProcessor' };
@@ -138,7 +138,7 @@
=head1 VERSION
-version 0.309
+version 0.310
=head1 METHODS
Modified: trunk/libapp-cmd-perl/lib/App/Cmd/Command/commands.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/lib/App/Cmd/Command/commands.pm?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/lib/App/Cmd/Command/commands.pm (original)
+++ trunk/libapp-cmd-perl/lib/App/Cmd/Command/commands.pm Sun Dec 12 07:50:19 2010
@@ -3,7 +3,7 @@
package App::Cmd::Command::commands;
BEGIN {
- $App::Cmd::Command::commands::VERSION = '0.309';
+ $App::Cmd::Command::commands::VERSION = '0.310';
}
use App::Cmd::Command;
BEGIN { our @ISA = 'App::Cmd::Command' };
@@ -66,7 +66,7 @@
=head1 VERSION
-version 0.309
+version 0.310
=head1 DESCRIPTION
Modified: trunk/libapp-cmd-perl/lib/App/Cmd/Command/help.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/lib/App/Cmd/Command/help.pm?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/lib/App/Cmd/Command/help.pm (original)
+++ trunk/libapp-cmd-perl/lib/App/Cmd/Command/help.pm Sun Dec 12 07:50:19 2010
@@ -3,7 +3,7 @@
package App::Cmd::Command::help;
BEGIN {
- $App::Cmd::Command::help::VERSION = '0.309';
+ $App::Cmd::Command::help::VERSION = '0.310';
}
use App::Cmd::Command;
BEGIN { our @ISA = 'App::Cmd::Command'; }
@@ -67,7 +67,7 @@
=head1 VERSION
-version 0.309
+version 0.310
=head1 DESCRIPTION
Modified: trunk/libapp-cmd-perl/lib/App/Cmd/Plugin.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/lib/App/Cmd/Plugin.pm?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/lib/App/Cmd/Plugin.pm (original)
+++ trunk/libapp-cmd-perl/lib/App/Cmd/Plugin.pm Sun Dec 12 07:50:19 2010
@@ -2,7 +2,7 @@
use warnings;
package App::Cmd::Plugin;
BEGIN {
- $App::Cmd::Plugin::VERSION = '0.309';
+ $App::Cmd::Plugin::VERSION = '0.310';
}
# ABSTRACT: a plugin for App::Cmd commands
@@ -26,7 +26,7 @@
=head1 VERSION
-version 0.309
+version 0.310
=head1 AUTHOR
Modified: trunk/libapp-cmd-perl/lib/App/Cmd/Setup.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/lib/App/Cmd/Setup.pm?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/lib/App/Cmd/Setup.pm (original)
+++ trunk/libapp-cmd-perl/lib/App/Cmd/Setup.pm Sun Dec 12 07:50:19 2010
@@ -2,7 +2,7 @@
use warnings;
package App::Cmd::Setup;
BEGIN {
- $App::Cmd::Setup::VERSION = '0.309';
+ $App::Cmd::Setup::VERSION = '0.310';
}
# ABSTRACT: helper for setting up App::Cmd classes
@@ -13,6 +13,9 @@
use Carp ();
use Data::OptList ();
use String::RewritePrefix ();
+
+# 0.06 is needed for load_optional_class
+use Class::Load 0.06 qw();
use Sub::Exporter -setup => {
-as => '_import',
@@ -43,31 +46,7 @@
$self->_make_x_isa_y($into, $self->_app_base_class);
- my $cmd_base = $into->_default_command_base;
- my $has_cmd_base;
-
- # test for the $cmd_base module existing.
- # it being missing is fine, but if its broken, we should tell somebody
- if (eval "require $cmd_base; 1") {
- # loading the file works
- $has_cmd_base = 1;
- } else {
- # Determine if the file is just missing, or if its broken.
- # If its broken, perl will have stashed a path in $INC for it.
- my $modpath = $cmd_base;
- $modpath =~ s{::}{/}g;
- $modpath .= '.pm';
-
- if (exists $INC{$modpath}) {
- die $@;
- }
- }
-
- unless (
- eval { $cmd_base->isa( $self->_command_base_class ) }
- or
- $has_cmd_base
- ) {
+ if ( ! Class::Load::load_optional_class( $into->_default_command_base ) ) {
my $base = $self->_command_base_class;
Sub::Install::install_sub({
code => sub { $base },
@@ -75,6 +54,11 @@
as => '_default_command_base',
});
}
+
+ # TODO Check this is right. -- kentnl, 2010-12
+ #
+ # my $want_plugin_base = $self->_plugin_base_class;
+ my $want_plugin_base = 'App::Cmd::Plugin';
my @plugins;
for my $plugin (@{ $val->{plugins} || [] }) {
@@ -85,11 +69,10 @@
},
$plugin,
);
-
- unless (eval { $plugin->isa($self->_plugin_base_class) }) {
- eval "require $plugin; 1" or die "couldn't load plugin $plugin: $@";
+ Class::Load::load_class( $plugin );
+ unless( $plugin->isa( $want_plugin_base ) ){
+ die "$plugin is not a " . $want_plugin_base;
}
-
push @plugins, $plugin;
}
@@ -166,7 +149,7 @@
=head1 VERSION
-version 0.309
+version 0.310
=head1 OVERVIEW
Modified: trunk/libapp-cmd-perl/lib/App/Cmd/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/lib/App/Cmd/Simple.pm?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/lib/App/Cmd/Simple.pm (original)
+++ trunk/libapp-cmd-perl/lib/App/Cmd/Simple.pm Sun Dec 12 07:50:19 2010
@@ -3,7 +3,7 @@
package App::Cmd::Simple;
BEGIN {
- $App::Cmd::Simple::VERSION = '0.309';
+ $App::Cmd::Simple::VERSION = '0.310';
}
use App::Cmd::Command;
BEGIN { our @ISA = 'App::Cmd::Command' }
@@ -102,7 +102,7 @@
=head1 VERSION
-version 0.309
+version 0.310
=head1 SYNOPSIS
Modified: trunk/libapp-cmd-perl/lib/App/Cmd/Subdispatch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/lib/App/Cmd/Subdispatch.pm?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/lib/App/Cmd/Subdispatch.pm (original)
+++ trunk/libapp-cmd-perl/lib/App/Cmd/Subdispatch.pm Sun Dec 12 07:50:19 2010
@@ -3,7 +3,7 @@
package App::Cmd::Subdispatch;
BEGIN {
- $App::Cmd::Subdispatch::VERSION = '0.309';
+ $App::Cmd::Subdispatch::VERSION = '0.310';
}
use App::Cmd;
@@ -78,7 +78,7 @@
=head1 VERSION
-version 0.309
+version 0.310
=head1 METHODS
Modified: trunk/libapp-cmd-perl/lib/App/Cmd/Subdispatch/DashedStyle.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/lib/App/Cmd/Subdispatch/DashedStyle.pm?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/lib/App/Cmd/Subdispatch/DashedStyle.pm (original)
+++ trunk/libapp-cmd-perl/lib/App/Cmd/Subdispatch/DashedStyle.pm Sun Dec 12 07:50:19 2010
@@ -3,7 +3,7 @@
package App::Cmd::Subdispatch::DashedStyle;
BEGIN {
- $App::Cmd::Subdispatch::DashedStyle::VERSION = '0.309';
+ $App::Cmd::Subdispatch::DashedStyle::VERSION = '0.310';
}
use App::Cmd::Subdispatch;
BEGIN { our @ISA = 'App::Cmd::Subdispatch' };
@@ -64,7 +64,7 @@
=head1 VERSION
-version 0.309
+version 0.310
=head1 METHODS
Modified: trunk/libapp-cmd-perl/lib/App/Cmd/Tester.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/lib/App/Cmd/Tester.pm?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/lib/App/Cmd/Tester.pm (original)
+++ trunk/libapp-cmd-perl/lib/App/Cmd/Tester.pm Sun Dec 12 07:50:19 2010
@@ -2,7 +2,7 @@
use warnings;
package App::Cmd::Tester;
BEGIN {
- $App::Cmd::Tester::VERSION = '0.309';
+ $App::Cmd::Tester::VERSION = '0.310';
}
# ABSTRACT: for capturing the result of running an app
@@ -67,7 +67,7 @@
{
package App::Cmd::Tester::Result;
BEGIN {
- $App::Cmd::Tester::Result::VERSION = '0.309';
+ $App::Cmd::Tester::Result::VERSION = '0.310';
}
sub new {
@@ -86,7 +86,7 @@
{
package App::Cmd::Tester::Exited;
BEGIN {
- $App::Cmd::Tester::Exited::VERSION = '0.309';
+ $App::Cmd::Tester::Exited::VERSION = '0.310';
}
sub throw {
my ($class, $code) = @_;
@@ -106,7 +106,7 @@
=head1 VERSION
-version 0.309
+version 0.310
=head1 SYNOPSIS
Modified: trunk/libapp-cmd-perl/lib/App/Cmd/Tutorial.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-cmd-perl/lib/App/Cmd/Tutorial.pod?rev=65774&op=diff
==============================================================================
--- trunk/libapp-cmd-perl/lib/App/Cmd/Tutorial.pod (original)
+++ trunk/libapp-cmd-perl/lib/App/Cmd/Tutorial.pod Sun Dec 12 07:50:19 2010
@@ -13,7 +13,7 @@
=head1 VERSION
-version 0.309
+version 0.310
=head1 DESCRIPTION
More information about the Pkg-perl-cvs-commits
mailing list