[Bps-public-commit] r10020 - bpsbuilder/BPB/lib/BPB/Source

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Dec 20 02:28:36 EST 2007


Author: sunnavy
Date: Thu Dec 20 02:28:35 2007
New Revision: 10020

Modified:
   bpsbuilder/BPB/lib/BPB/Source/CPAN.pm

Log:
not use cpan's ->prereq_pm to get requirements any more

Modified: bpsbuilder/BPB/lib/BPB/Source/CPAN.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source/CPAN.pm	(original)
+++ bpsbuilder/BPB/lib/BPB/Source/CPAN.pm	Thu Dec 20 02:28:35 2007
@@ -45,13 +45,12 @@
 
 =cut
 
-my $require_path;
 
 sub run {
     my $self = shift;
     $self->SUPER::run();
     my $compressed = BPB::Source::Compressed->new(%$self);
-    $compressed->run( '_require.yml' => $require_path, );
+    $compressed->run;
 }
 
 sub _run {
@@ -70,7 +69,7 @@
 
     croak 'invalid module name: ' . $self->source unless $module;
 
-    $self->_make_prereq($module);
+    $module->distribution->get;
 
     my $dist    = CPAN::DistnameInfo->new( $module->cpan_file )->dist;
     my $name    = $self->source;
@@ -89,25 +88,6 @@
     );
 }
 
-sub _make_prereq {
-    my $self   = shift;
-    my $module = shift;
-
-    $module->make;
-    $require_path =
-      File::Spec->catfile( $module->distribution->dir, '_require.yml' );
-
-    my $prereq = $module->distribution->prereq_pm || {};
-
-    BPB::Config::DumpFile(
-        $require_path,
-        {
-            %{ $prereq->{requires} || {} }, %{ $prereq->{build_requires} || {} }
-        }
-    );
-
-    $module->clean;
-}
 
 1;
 



More information about the Bps-public-commit mailing list