Skip to content

Commit

Permalink
Undo quote & whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
josegomezr committed Jan 14, 2024
1 parent 0fee352 commit 29af88e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/OpenQA/Test/PatchDeparse.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ 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
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.
Expand All @@ -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
Expand All @@ -63,3 +63,5 @@ elsif ($B::Deparse::VERSION) {
}
## use critic
1;


0 comments on commit 29af88e

Please sign in to comment.