Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make it 5.8 compatible

  • Loading branch information...
commit e6445da71b923472937bee367d957aeba6eab5e8 1 parent d08108f
@miyagawa miyagawa authored
View
2  Makefile.PL
@@ -2,7 +2,7 @@ use inc::Module::Install;
name 'Test-Cukes';
all_from 'lib/Test/Cukes.pm';
-perl_version '5.010';
+perl_version '5.008';
requires
"Carp::Assert" => "0.20",
View
1  lib/Test/Cukes/Feature.pm
@@ -1,6 +1,5 @@
package Test::Cukes::Feature;
use Any::Moose;
-use 5.010;
use Test::Cukes::Scenario;
View
12 lib/Test/Cukes/Scenario.pm
@@ -1,6 +1,5 @@
package Test::Cukes::Scenario;
use Any::Moose;
-use 5.010;
has name => (
is => "rw",
@@ -24,13 +23,10 @@ sub BUILDARGS {
};
for my $line (split /\n+/, $scenario_text) {
- given ($line) {
- when (/^Scenario:\s(.+)$/) {
- $args->{name} = $1;
- }
- when (/^ (Given|When|Then|And)\s(.+)$/) {
- push @{$args->{ steps }}, "$1 $2";
- }
+ if ($line =~ /^Scenario:\s(.+)$/) {
+ $args->{name} = $1;
+ } elsif ($line =~ /^ (Given|When|Then|And)\s(.+)$/) {
+ push @{$args->{ steps }}, "$1 $2";
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.