[carton] 75/472: Add . (current dir) to the INC

Lucas Kanashiro kanashiro-guest at moszumanska.debian.org
Fri Jul 24 00:38:34 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 2efe6f27e3d73c5e60ea3879dc1c90547319017c
Author: Tatsuhiko Miyagawa <miyagawa at bulknews.net>
Date:   Tue Jun 28 13:46:58 2011 -0400

    Add . (current dir) to the INC
    
    This allows plackup/starman to load .psgi files using do()
---
 Makefile.PL       |  1 -
 lib/Carton/CLI.pm |  2 +-
 lib/Carton/lib.pm | 14 ++++++++++++++
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/Makefile.PL b/Makefile.PL
index 7a6c29a..b88e1d2 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -13,7 +13,6 @@ requires 'Term::ANSIColor', 1.12;
 requires 'Module::Metadata', 1.000003;
 requires 'Try::Tiny';
 requires 'parent';
-requires 'lib::core::only';
 
 install_script 'bin/carton';
 
diff --git a/lib/Carton/CLI.pm b/lib/Carton/CLI.pm
index 5f4bc3c..3c0eafa 100644
--- a/lib/Carton/CLI.pm
+++ b/lib/Carton/CLI.pm
@@ -364,7 +364,7 @@ sub cmd_exec {
     $self->parse_options(\@args, "system", \$system); # always run parse_options to allow --
 
     my $path = $self->config->get('path');
-    local $ENV{PERL5OPT} = "-Mlib::core::only -Mlib=$path/lib/perl5";
+    local $ENV{PERL5OPT} = "-MCarton::lib=. -Mlib=$path/lib/perl5";
     local $ENV{PATH} = "$path/bin:$ENV{PATH}";
 
     $system ? system(@args) : exec(@args);
diff --git a/lib/Carton/lib.pm b/lib/Carton/lib.pm
new file mode 100644
index 0000000..75d2792
--- /dev/null
+++ b/lib/Carton/lib.pm
@@ -0,0 +1,14 @@
+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