Subject: | Module reports wrong package name for last statement of a package |
The module reports a wrong package name for the last statment of a
package in a file with multiple packages:
package MyTest;
our $var = 0;
my $test = 1;
sub test {};
package main;
use strict;
use warnings;
use 5.010;
use Devel::InPackage qw(in_package);
say in_package( file => $0, line => 5 ); # main
say in_package( file => $0, line => 9 ); # main
say in_package( code => slurp(), line => 15 ); # main
sub slurp {
local $/;
open my $fh, '<', $0;
return <$fh>;
}
The first one should be MyTest...