summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToby Inkster <mail@tobyinkster.co.uk>2013-07-19 18:11:26 +0100
committerToby Inkster <mail@tobyinkster.co.uk>2013-07-19 18:11:26 +0100
commit4e66b9cd047e4e264394200b2dd0288178bece73 (patch)
tree592f21a5dae7e0b25aa2c6a4a3dadff640341f36
parent71716d5093ef54c877686d042fc3d5de3e92f265 (diff)
downloaddist-checkconflicts-4e66b9cd047e4e264394200b2dd0288178bece73.tar.gz
dist-checkconflicts-4e66b9cd047e4e264394200b2dd0288178bece73.zip
Works in Perl 5.6.
_strip_opt seems to trigger some bizarro bug in Perl 5.6 taking an index within @_.
-rw-r--r--lib/Dist/CheckConflicts.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Dist/CheckConflicts.pm b/lib/Dist/CheckConflicts.pm
index 97c22d9..299a746 100644
--- a/lib/Dist/CheckConflicts.pm
+++ b/lib/Dist/CheckConflicts.pm
@@ -1,7 +1,7 @@
package Dist::CheckConflicts;
use strict;
use warnings;
-use 5.008001;
+use 5.006;
# ABSTRACT: declare version conflicts for your dist
use base 'Exporter';
@@ -173,16 +173,16 @@ sub import {
}
sub _strip_opt {
- my $opt = shift;
- my $idx = first_index { ( $_ || '' ) eq $opt } @_;
+ my ($opt, @args) = @_;
+ my $idx = first_index { ( $_ || '' ) eq $opt } @args;
- return ( undef, @_ ) unless $idx >= 0 && $#_ >= $idx + 1;
+ return ( undef, @args ) unless $idx >= 0 && $#args >= $idx + 1;
- my $val = $_[ $idx + 1 ];
+ my $val = $args[ $idx + 1 ];
- splice @_, $idx, 2;
+ splice @args, $idx, 2;
- return ( $val, @_ );
+ return ( $val, @args );
}
sub _check_version {