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

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

commit 0565f888db8f5b3c29b3ae7d9ad65c1f1b0abc87
Author: Tatsuhiko Miyagawa <miyag...@bulknews.net>
Date:   Mon Jun 3 18:05:24 2013 +0900

    Change $lock->find logic to search for provides maps. Return Dependency 
objects
---
 lib/Carton/CLI.pm  | 4 ++--
 lib/Carton/Lock.pm | 9 ++++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/lib/Carton/CLI.pm b/lib/Carton/CLI.pm
index 2e7f852..b3bf6bd 100644
--- a/lib/Carton/CLI.pm
+++ b/lib/Carton/CLI.pm
@@ -228,9 +228,9 @@ sub cmd_show {
         or $self->error("Can't find carton.lock: Run `carton install`\n");
 
     for my $module (@args) {
-        my $meta = $lock->find($module)
+        my $dependency = $lock->find($module)
             or $self->error("Couldn't locate $module in carton.lock\n");
-        $self->print( Carton::Util::to_json($meta) );
+        $self->print( $dependency->dist . "\n" );
     }
 }
 
diff --git a/lib/Carton/Lock.pm b/lib/Carton/Lock.pm
index 192800d..02d8651 100644
--- a/lib/Carton/Lock.pm
+++ b/lib/Carton/Lock.pm
@@ -32,7 +32,14 @@ sub dependencies {
 
 sub find {
     my($self, $module) = @_;
-    $self->modules->{$module};
+
+    for my $meta (values %{$_[0]->modules}) {
+        if ($meta->{provides}{$module}) {
+            return Carton::Dependency->new( $self->modules->{$meta->{name}} );
+        }
+    }
+
+    return;
 }
 
 sub index {

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

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to