summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-07-19 12:23:38 -0700
committerJesse Luehrs <doy@tozt.net>2013-07-19 12:23:38 -0700
commitbd71aa7b0af4b6aac22d67006ad377978d2b8aec (patch)
treec94d1985121e5d25be2a18dc5ff07d69c1410c8d
parent71716d5093ef54c877686d042fc3d5de3e92f265 (diff)
parenta8e8413925f1f3710de29bfcfdead12f5da0f2e9 (diff)
downloaddist-checkconflicts-bd71aa7b0af4b6aac22d67006ad377978d2b8aec.tar.gz
dist-checkconflicts-bd71aa7b0af4b6aac22d67006ad377978d2b8aec.zip
Merge pull request #4 from tobyink/master
Perl 5.6.x support
-rw-r--r--Changes1
-rw-r--r--lib/Dist/CheckConflicts.pm14
2 files changed, 8 insertions, 7 deletions
diff --git a/Changes b/Changes
index 63ef0e9..e70e836 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
Revision history for Dist-CheckConflicts
{{$NEXT}}
+ - support Perl 5.6.x (Toby Inkster)
0.08 2013-07-09
- remove Test::Warnings dep
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 {