This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix deparsing of require "a".$1
[perl5.git] / dist / B-Deparse / Deparse.pm
index 977ce4d..3ca229d 100644 (file)
@@ -1889,7 +1889,10 @@ sub pp_require {
     } else {   
        $self->unop(
            $op, $cx,
     } else {   
        $self->unop(
            $op, $cx,
-           $op->first->private & OPpCONST_NOVER ? "no" : $opname,
+           $op->first->name eq 'const'
+            && $op->first->private & OPpCONST_NOVER
+                ? "no"
+                : $opname,
            1, # llafr does not apply
        );
     }
            1, # llafr does not apply
        );
     }