Skip to content

Commit 47ac18a

Browse files
committed
1 parent 729f176 commit 47ac18a

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

perl/lib/Gherkin.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ sub from_paths {
3232
my ($class, $paths, $id_generator, $sink, %options) = @_;
3333

3434
my $gherkin = $class->new(%options);
35-
for my $path (@$paths) {
35+
for my $path (@{$paths}) {
3636
# Note: There's a huge difference between ':utf8' and
3737
# ':encoding(UTF-8)' in Perl: the latter causes strict UTF-8 conversion
3838
# and fails hard if there are encoding problems. The former

perl/lib/Gherkin/AstBuilder.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ sub get_table_rows {
121121

122122
sub ensure_cell_count {
123123
my ( $self, $rows ) = @_;
124-
return unless @$rows;
124+
return unless @{$rows};
125125

126126
my $cell_count;
127127

128-
for my $row (@$rows) {
128+
for my $row (@{$rows}) {
129129
my $this_row_count = @{ $row->cells };
130130
$cell_count = $this_row_count unless defined $cell_count;
131131
unless ( $cell_count == $this_row_count ) {
@@ -182,7 +182,7 @@ sub transform_node {
182182
my $media_type = $separator_token->matched_text;
183183
my $delimiter = $separator_token->matched_keyword;
184184
my $line_tokens = $node->get_tokens('Other');
185-
my $content = join( "\n", map { $_->matched_text } @$line_tokens );
185+
my $content = join( "\n", map { $_->matched_text } @{$line_tokens} );
186186

187187
return Cucumber::Messages::DocString->new(
188188
location => $self->get_location($separator_token),

perl/lib/Gherkin/Line.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ sub table_cells {
121121
$stripped_cell =~ s/\s+$//;
122122
$stripped_cell =~ s/(\\\\|\\\||\\n)/$unescape_map{$1}/g;
123123
push(
124-
@$cells,
124+
@{$cells},
125125
{
126126
column => $col + $self->indent + $cell_indent,
127127
text => $stripped_cell

perl/lib/Gherkin/Pickles/Compiler.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ sub _compile_scenario {
7878
}
7979
}
8080

81-
my @all_tags = (@$tags, @{ $scenario->tags || [] });
81+
my @all_tags = (@{$tags}, @{ $scenario->tags || [] });
8282
$pickle_sink->(
8383
Cucumber::Messages::Envelope->new(
8484
pickle => Cucumber::Messages::Pickle->new(
@@ -152,7 +152,7 @@ sub _compile_rule {
152152
my ( $class, $uri, $feature_tags, $feature_background_steps,
153153
$rule_definition, $language, $id_generator, $pickle_sink )
154154
= @_;
155-
my @background_steps = ( @$feature_background_steps );
155+
my @background_steps = ( @{$feature_background_steps} );
156156
my @tags = (
157157
@{ $feature_tags || [] },
158158
@{ $rule_definition->tags || [] }
@@ -241,7 +241,7 @@ sub _pickle_step_props {
241241

242242
sub _pickle_tags {
243243
my ( $class, $tags ) = @_;
244-
return [ map { $class->_pickle_tag( $_ ) } @$tags ];
244+
return [ map { $class->_pickle_tag( $_ ) } @{$tags} ];
245245
}
246246

247247
sub _pickle_tag {

perl/lib/Gherkin/TokenMatcher.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ sub new {
2727
sub _add_keyword_type_mappings {
2828
my ($keyword_types, $keywords, $type) = @_;
2929

30-
for my $keyword (@$keywords) {
30+
for my $keyword (@{$keywords}) {
3131
if (not exists $keyword_types->{$keyword}) {
3232
$keyword_types->{$keyword} = [];
3333
}
@@ -122,7 +122,7 @@ sub _match_title_line {
122122
my ( $self, $token, $token_type, $keywords ) = @_;
123123
return unless $token->line;
124124

125-
for my $keyword (@$keywords) {
125+
for my $keyword (@{$keywords}) {
126126
if ( $token->line->startswith_title_keyword($keyword) ) {
127127
my $title =
128128
$token->line->get_rest_trimmed( length( $keyword . ': ' ) );

perl/t/020_parser_instantiation.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ for (
2222
[ stringref => \$content ], # By content
2323
[ scanner => Gherkin::TokenScanner->new( '' . $file ) ], # Object
2424
) {
25-
my ( $type, $input ) = @$_;
25+
my ( $type, $input ) = @{$_};
2626
$results{ $type } = Gherkin::Parser->new->parse( $input );
2727
ok( 'true', "Parsing via $type lived" );
2828
}

0 commit comments

Comments
 (0)