When deparsing a nextstate op that has both a change of package (relative
to the previous nextstate) and a label, the package declaration must be
emitted first, because it is syntactically impermissible for a label to
prefix a package declaration.
PMf_MULTILINE PMf_SINGLELINE PMf_FOLD PMf_EXTENDED),
($] < 5.009 ? 'PMf_SKIPWHITE' : 'RXf_SKIPWHITE'),
($] < 5.011 ? 'CVf_LOCKED' : ());
PMf_MULTILINE PMf_SINGLELINE PMf_FOLD PMf_EXTENDED),
($] < 5.009 ? 'PMf_SKIPWHITE' : 'RXf_SKIPWHITE'),
($] < 5.011 ? 'CVf_LOCKED' : ());
use strict;
use vars qw/$AUTOLOAD/;
use warnings ();
use strict;
use vars qw/$AUTOLOAD/;
use warnings ();
$self->{'curcop'} = $op;
my @text;
push @text, $self->cop_subs($op);
$self->{'curcop'} = $op;
my @text;
push @text, $self->cop_subs($op);
- push @text, $op->label . ": " if $op->label;
my $stash = $op->stashpv;
if ($stash ne $self->{'curstash'}) {
push @text, "package $stash;\n";
my $stash = $op->stashpv;
if ($stash ne $self->{'curstash'}) {
push @text, "package $stash;\n";
' "' . $op->file, qq'"\n';
}
' "' . $op->file, qq'"\n';
}
+ push @text, $op->label . ": " if $op->label;
+
return join("", @text);
}
return join("", @text);
}
require feature;
feature->import(':5.10');
}
require feature;
feature->import(':5.10');
}
-use Test::More tests => 84;
+use Test::More tests => 85;
use Config ();
use B::Deparse;
use Config ();
use B::Deparse;
$r = qr/foo/;
@a = split(/$r/, $s, 0);
();
$r = qr/foo/;
@a = split(/$r/, $s, 0);
();
+####
+{
+ package Foo;
+ label: print 123;
+}