[Bps-public-commit] r15157 - Shipwright/branches/1.10/lib/Shipwright/Script
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Aug 14 09:41:53 EDT 2008
Author: sunnavy
Date: Thu Aug 14 09:41:52 2008
New Revision: 15157
Modified:
Shipwright/branches/1.10/lib/Shipwright/Script/Import.pm
Log:
lower version of List::MoreUtils does not have first_index
Modified: Shipwright/branches/1.10/lib/Shipwright/Script/Import.pm
==============================================================================
--- Shipwright/branches/1.10/lib/Shipwright/Script/Import.pm (original)
+++ Shipwright/branches/1.10/lib/Shipwright/Script/Import.pm Thu Aug 14 09:41:52 2008
@@ -17,7 +17,7 @@
use File::Temp qw/tempdir/;
use Config;
use Hash::Merge;
-use List::MoreUtils qw/uniq first_index/;
+use List::MoreUtils qw/uniq firstidx/;
Hash::Merge::set_behavior('RIGHT_PRECEDENT');
@@ -366,19 +366,19 @@
my $shipwright = shift;
my $order = $shipwright->backend->order;
- my $first_cpan_index = first_index { /^cpan-/ } @$order;
+ my $first_cpan_index = firstidx { /^cpan-/ } @$order;
unless (
(
$order->[$first_cpan_index] eq 'cpan-ExtUtils-MakeMaker'
- && ( ( ( first_index { $_ eq 'cpan-Module-Build' } @$order ) == -1 )
+ && ( ( ( firstidx { $_ eq 'cpan-Module-Build' } @$order ) == -1 )
|| $order->[ $first_cpan_index + 1 ] eq 'cpan-Module-Build' )
)
|| (
$order->[$first_cpan_index] eq 'cpan-Module-Build'
&& (
(
- ( first_index { $_ eq 'cpan-ExtUtils-MakeMaker' } @$order )
+ ( firstidx { $_ eq 'cpan-ExtUtils-MakeMaker' } @$order )
== -1
)
|| $order->[ $first_cpan_index + 1 ] eq
@@ -388,7 +388,7 @@
)
{
for my $build (qw/cpan-ExtUtils-MakeMaker cpan-Module-Build/) {
- my $index = first_index { $build eq $_ } @$order;
+ my $index = firstidx { $build eq $_ } @$order;
next if $index == -1; # $index == -1 if not found
if ( $index > $first_cpan_index ) { # not the 1st cpan dist
splice @$order, $first_cpan_index, 0, $build;
More information about the Bps-public-commit
mailing list