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

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

commit 900e6370763463558eb5c6b16fc20aa743329329
Author: Tatsuhiko Miyagawa <miyag...@bulknews.net>
Date:   Thu May 30 17:45:19 2013 +0900

    Simplify package finder
---
 lib/Carton/Lock.pm | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/lib/Carton/Lock.pm b/lib/Carton/Lock.pm
index 896fde7..cb4cb01 100644
--- a/lib/Carton/Lock.pm
+++ b/lib/Carton/Lock.pm
@@ -14,19 +14,14 @@ sub modules {
 sub packages {
     my $self = shift;
 
-    my $index;
+    my @packages;
     while (my($name, $metadata) = each %{$self->{modules}}) {
-        for my $mod (keys %{$metadata->{provides}}) {
-            $index->{$mod} = { %{$metadata->{provides}{$mod}}, meta => 
$metadata };
+        while (my($package, $provides) = each %{$metadata->{provides}}) {
+            # TODO what if duplicates?
+            push @packages, Carton::Package->new($package, 
$provides->{version}, $metadata->{pathname});
         }
     }
 
-    my @packages;
-    for my $package (sort keys %$index) {
-        my $module = $index->{$package};
-        push @packages, Carton::Package->new($package, $module->{version}, 
$module->{meta}{pathname});
-    }
-
     return @packages;
 }
 

-- 
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