[libcatmandu-perl] 11/46: Adding info command deleting obsolete exporers, importers modules command

Jonas Smedegaard dr at jones.dk
Tue Oct 14 13:52:51 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 98bc79ffe8e708a5ec8ae08f2143857926c93d9a
Author: Patrick Hochstenbach <patrick.hochstenbach at ugent.be>
Date:   Sat Jul 5 14:28:33 2014 +0200

    Adding info command deleting obsolete exporers, importers modules
    command
---
 lib/Catmandu/Cmd/exporters.pm | 67 ------------------------------------------
 lib/Catmandu/Cmd/importers.pm | 67 ------------------------------------------
 lib/Catmandu/Cmd/stores.pm    | 68 -------------------------------------------
 3 files changed, 202 deletions(-)

diff --git a/lib/Catmandu/Cmd/exporters.pm b/lib/Catmandu/Cmd/exporters.pm
deleted file mode 100644
index 8787f7c..0000000
--- a/lib/Catmandu/Cmd/exporters.pm
+++ /dev/null
@@ -1,67 +0,0 @@
-package Catmandu::Cmd::exporters;
-
-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::Exporter'
-    };
-    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::exporters - list installed Catmandu exporters
-
-=head1 DESCRIPTION
-
-This L<Catmandu::Cmd> uses L<Catmandu::Importer::Modules> to list all
-modules in namespace L<Catmandu::Exporter>.
-
-=cut
-
-1;
diff --git a/lib/Catmandu/Cmd/importers.pm b/lib/Catmandu/Cmd/importers.pm
deleted file mode 100644
index 3c62bbf..0000000
--- a/lib/Catmandu/Cmd/importers.pm
+++ /dev/null
@@ -1,67 +0,0 @@
-package Catmandu::Cmd::importers;
-
-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::Importer'
-    };
-    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::importers - list installed Catmandu importers
-
-=head1 DESCRIPTION
-
-This L<Catmandu::Cmd> uses L<Catmandu::Importer::Modules> to list all
-modules in namespace L<Catmandu::Importer>.
-
-=cut
-
-1;
diff --git a/lib/Catmandu/Cmd/stores.pm b/lib/Catmandu/Cmd/stores.pm
deleted file mode 100644
index 4f075d8..0000000
--- a/lib/Catmandu/Cmd/stores.pm
+++ /dev/null
@@ -1,68 +0,0 @@
-package Catmandu::Cmd::stores;
-
-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::Store'
-    };
-    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::stores - list installed Catmandu stores
-
-=head1 SEE ALSO
-
-This L<Catmandu::Cmd> uses L<Catmandu::Importer::Modules> to list all
-modules in namespace L<Catmandu::Store>.
-
-=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