[Bps-public-commit] r9698 - bpsbuilder/bin

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Nov 19 09:31:16 EST 2007


Author: sunnavy
Date: Mon Nov 19 09:31:13 2007
New Revision: 9698

Modified:
   bpsbuilder/bin/import-cpan-dists

Log:
CPAN::Distribution::prereq_pm returns { requires => { ... }, build_requires => { ... } } since 1.88_51

Modified: bpsbuilder/bin/import-cpan-dists
==============================================================================
--- bpsbuilder/bin/import-cpan-dists	(original)
+++ bpsbuilder/bin/import-cpan-dists	Mon Nov 19 09:31:13 2007
@@ -161,8 +161,13 @@
         if ( $args{follow} ) {
             my @new_dependencies;
             if ( my $pre_req = $current_module->distribution->prereq_pm ) {
-                my @all_prereqs
-                    = clean_module_list( $args{'skip'}, keys %$pre_req );
+
+# since 1.88_51, CPAN::Distribution::prereq_pm returns
+# { requires => { ... }, build_requires => { ... } }
+                my @all_prereqs = clean_module_list( $args{'skip'},
+                    ref $pre_req->{requires} eq 'HASH'
+                    ? map { keys %{ $pre_req->{$_} } } keys %$pre_req
+                    : keys %{$pre_req} );
                 my %this_seen;
                 foreach
                     my $mod ( grep { !should_skip_module($_) } @all_prereqs )



More information about the Bps-public-commit mailing list