Skip to content

Commit 57d9258

Browse files
author
Chris White
committed
Change package syntax to pre-5.14.0
Instead of package Foo {...}, use {package Foo; ...} as suggested by perldelta5140.
1 parent 688f0d5 commit 57d9258

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/Text/PerlPP.pm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,10 @@ sub ExecuteCommand {
248248
# to with its full package name if we didn't have the `our`.
249249
# TODO add a pound line to this eval based on the current line number
250250

251+
# NOTE: `package NAME BLOCK` syntax was added in Perl 5.14.0, May 2011.
251252
my $code = qq{ ;
252-
package $self->{Package} {
253+
{
254+
package $self->{Package};
253255
our \$@{[PPP_SELF_INSIDE]};
254256
$1
255257
};
@@ -276,7 +278,8 @@ sub ExecuteCommand {
276278

277279
# TODO add a pound line to this eval
278280
my $code = qq{ ;
279-
package $self->{Package} {
281+
{
282+
package $self->{Package};
280283
our \$@{[PPP_SELF_INSIDE]};
281284
$1
282285
};

0 commit comments

Comments
 (0)