[libcatmandu-perl] 15/46: Deleting obsolete fixes command

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 c188fea46d862843c81289bc631c8b1804df7bc2
Author: Patrick Hochstenbach <patrick.hochstenbach at ugent.be>
Date:   Sat Jul 5 14:32:14 2014 +0200

    Deleting obsolete fixes command
---
 lib/Catmandu/Cmd/fixes.pm | 67 -----------------------------------------------
 1 file changed, 67 deletions(-)

diff --git a/lib/Catmandu/Cmd/fixes.pm b/lib/Catmandu/Cmd/fixes.pm
deleted file mode 100644
index b5d07da..0000000
--- a/lib/Catmandu/Cmd/fixes.pm
+++ /dev/null
@@ -1,67 +0,0 @@
-package Catmandu::Cmd::fixes;
-
-use Catmandu::Sane;
-use parent 'Catmandu::Cmd';
-use Catmandu::Importer::Modules;
-
-sub command_opt_spec {
-    (
-        ["inc=s@", 'override included directories (defaults to @INC)', {default => [@INC]}],
-        ["verbose|v", ""]
-    );
-}
-
-sub command {
-    my ($self, $opts, $args) = @_;
-    my $verbose = $opts->verbose;
-    my $from_opts = {
-        namespace => 'Catmandu::Fix'
-    };
-    for my $key (qw(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::fixes - list installed Catmandu fixes
-
-=head1 DESCRIPTION
-
-This L<Catmandu::Cmd> uses L<Catmandu::Importer::Modules> to list all
-modules in namespace L<Catmandu::Fix>.
-
-=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