[carton] 98/472: use lib::core::only

Lucas Kanashiro kanashiro-guest at moszumanska.debian.org
Fri Jul 24 00:38:37 UTC 2015


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

kanashiro-guest pushed a commit to branch master
in repository carton.

commit d5aea4d49fddf892b9d33d78d1d76a6bb694ce27
Author: Tatsuhiko Miyagawa <miyagawa at bulknews.net>
Date:   Fri Jul 1 16:01:11 2011 -0700

    use lib::core::only
---
 Makefile.PL       |  1 +
 lib/Carton/CLI.pm |  6 +++---
 lib/Carton/lib.pm | 14 --------------
 3 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/Makefile.PL b/Makefile.PL
index 79a30a8..49e5573 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -16,6 +16,7 @@ requires 'parent', 0.223;
 requires 'Config::GitLike', 1.05;
 requires 'Mouse', 0.93;
 requires 'Text::ParseWords', 3.10;
+requires 'local::lib', 1.008;
 
 install_script 'bin/carton';
 
diff --git a/lib/Carton/CLI.pm b/lib/Carton/CLI.pm
index 9eeabf3..9aa7b02 100644
--- a/lib/Carton/CLI.pm
+++ b/lib/Carton/CLI.pm
@@ -403,10 +403,10 @@ sub cmd_exec {
     my @include;
     $self->parse_options(\@args, 'I=s@', \@include, "system", \$system);
 
-    my $include = join ",", @include, ".";
-
     my $path = $self->config->get(key => 'environment.path');
-    local $ENV{PERL5OPT} = "-MCarton::lib=$include -Mlib=$path/lib/perl5";
+    my $lib  = join ",", @include, "$path/lib/perl5", ".";
+
+    local $ENV{PERL5OPT} = "-Mlib::core::only -Mlib=$lib";
     local $ENV{PATH} = "$path/bin:$ENV{PATH}";
 
     $system ? system(@args) : exec(@args);
diff --git a/lib/Carton/lib.pm b/lib/Carton/lib.pm
deleted file mode 100644
index 75d2792..0000000
--- a/lib/Carton/lib.pm
+++ /dev/null
@@ -1,14 +0,0 @@
-package Carton::lib;
-use strict;
-
-# lib::core::only + additional paths
-
-use Config;
-sub import {
-    my($class, @path) = @_;
-    @INC = (@Config{qw(privlibexp archlibexp)}, @path);
-    return;
-}
-
-1;
-

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



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