[libcatmandu-perl] 12/46: Deleting obsolere modules commands

Jonas Smedegaard dr at jones.dk
Tue Oct 14 13:52:52 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.9205
in repository libcatmandu-perl.

commit 12a57312eefd02845e19775b682db6f5a7ab1683
Author: Patrick Hochstenbach <patrick.hochstenbach at ugent.be>
Date:   Sat Jul 5 14:29:20 2014 +0200

    Deleting obsolere modules commands
---
 lib/Catmandu/Cmd/modules.pm | 67 ---------------------------------------------
 1 file changed, 67 deletions(-)

diff --git a/lib/Catmandu/Cmd/modules.pm b/lib/Catmandu/Cmd/modules.pm
deleted file mode 100644
index e6752c1..0000000
--- a/lib/Catmandu/Cmd/modules.pm
+++ /dev/null
@@ -1,67 +0,0 @@
-package Catmandu::Cmd::modules;
-
-use Catmandu::Sane;
-use parent 'Catmandu::Cmd';
-use Catmandu::Importer::Modules;
-
-sub command_opt_spec {
-    (
-        ["namespace=s", "namespace"],
-        ["max_depth=i", "maximum depth to search for modules"],
-        ["inc=s@", 'override included directories (defaults to @INC)', {default => [@INC]}],
-        ["verbose|v", "include package information"]
-    );
-}
-
-sub command {
-    my ($self, $opts, $args) = @_;
-    my $verbose = $opts->verbose;
-    my $from_opts = {};
-    for my $key (qw(namespace max_depth inc)) {
-        $from_opts->{$key} = $opts->$key if defined $opts->$key;
-    }
-    my $from = Catmandu::Importer::Modules->new($from_opts);
-
-    my $into_args = [];
-    my $into_opts = {};
-    my $into;
-
-    if (@$args && $args->[0] eq 'to') {
-        for (my $i = 1; $i < @$args; $i++) {
-            my $arg = $args->[$i];
-            if ($arg =~ s/^-+//) {
-                $arg =~ s/-/_/g;
-                if ($arg eq 'fix') {
-                    push @{$into_opts->{$arg} ||= []}, $args->[++$i];
-                } else {
-                    $into_opts->{$arg} = $args->[++$i];
-                }
-            } else {
-                push @$into_args, $arg;
-            }
-        }
-    }
-
-    if (@$into_args || %$into_opts) {
-        $into = Catmandu->exporter($into_args->[0], $into_opts);
-        $into->add_many($from);
-        $into->commit;
-    } else {
-        my $cols = [qw(name version)];
-        push @$cols, 'file' if $opts->verbose;
-        $from->format(cols => $cols);
-    }
-}
-
-=head1 NAME
-
-Catmandu::Cmd::modules - list installed perl modules in a given namespace
-
-=head1 DESCRIPTION
-
-This L<Catmandu::Cmd> uses L<Catmandu::Importer::Modules> to list all
-modules in a given namespace.
-
-=cut
-
-1;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcatmandu-perl.git



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