Subject: | misparse in bless statement |
PPI interprets the 'package' in
bless { package => $foo }
as a package statement. Test attached.
Subject: | test5.pl |
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use PPI;
my $file = <<'EOF';
bless { package => $namespace }
EOF
my $ppi = PPI::Document->new(\$file);
ok(!$ppi->find(sub { $_[1]->isa('PPI::Statement::Package') }),
"no package statement");
done_testing;