diff --git a/lib/OpenQA/Test/PatchDeparse.pm b/lib/OpenQA/Test/PatchDeparse.pm index fa59761..ad9603d 100644 --- a/lib/OpenQA/Test/PatchDeparse.pm +++ b/lib/OpenQA/Test/PatchDeparse.pm @@ -16,7 +16,7 @@ if ( { #<<< do not let perltidy nor perlcritic touch this -## no critic (TestingAndDebugging::ProhibitNoStrict) +## no critic (TestingAndDebugging::ProhibitNoStrict ValuesAndExpressions::ProhibitInterpolationOfLiterals) # This is not our code, and formatting should stay the same for # better comparison with new versions of B::Deparse # <---- PATCH @@ -24,12 +24,12 @@ package B::Deparse; no warnings 'redefine'; no strict 'refs'; -*{'B::Deparse::walk_lineseq'} = sub { +*{"B::Deparse::walk_lineseq"} = sub { my ($self, $op, $kids, $callback) = @_; my @kids = @$kids; for (my $i = 0; $i < @kids; $i++) { - my $expr = ''; + my $expr = ""; if (is_state $kids[$i]) { # Patch for: # Use of uninitialized value $expr in concatenation (.) or string at /usr/lib/perl5/5.26.1/B/Deparse.pm line 1794. @@ -41,7 +41,7 @@ no strict 'refs'; } if (is_for_loop($kids[$i])) { $callback->($expr . $self->for_loop($kids[$i], 0), - $i += $kids[$i]->sibling->name eq 'unstack' ? 2 : 1); + $i += $kids[$i]->sibling->name eq "unstack" ? 2 : 1); next; } my $expr2 = $self->deparse($kids[$i], (@kids != 1)/2) // ''; # prevent undef $expr2