$ ./perl -MO=Concise -Ilib -le '; print <\n>'
8 <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 23 -e:1) v:{ ->3
7 <@> print vK ->8
3 <0> pushmark s ->4
6 <@> glob[t2] lK/1 ->7
- <0> ex-pushmark s ->4
4 <$> const[PV "\n"] s ->5
Can't locate object method "NAME" via package "B::SPECIAL" at lib/B/Concise.pm line 707.
CHECK failed--call queue aborted.
e88567f2acf38fe5ed90a88569b808e82cd3eca1 is the first bad commit
commit
e88567f2acf38fe5ed90a88569b808e82cd3eca1
Author: Father Chrysostomos <sprout@cpan.org>
Date: Sun Nov 4 20:18:51 2012 -0800
Stop the glob operator from leaking GVs
It was adding GVs to the symbol table (via newGVgen), so they
would never be freed, even after the op was freed, unless done so
explicitly.
There is no reason for these GVs to be exposed.
That means $gv->STASH returns a B::SPECIAL. B::Concise was not pre-
pared to handle that.
$hr->{svaddr} = sprintf("%#x", $$sv);
if ($hr->{svclass} eq "GV" && $sv->isGV_with_GP()) {
my $gv = $sv;
- my $stash = $gv->STASH->NAME; if ($stash eq "main") {
+ my $stash = $gv->STASH;
+ if (class($stash) eq "SPECIAL") {
+ $stash = "<none>";
+ }
+ else {
+ $stash = $stash->NAME;
+ }
+ if ($stash eq "main") {
$stash = "";
} else {
$stash = $stash . "::";
require 'test.pl'; # we use runperl from 'test.pl', so can't use Test::More
}
-plan tests => 160;
+plan tests => 161;
require_ok("B::Concise");
);
unlike $out, 'main::foo', '-nobanner';
+# glob
+$out =
+ runperl(
+ switches => ["-MO=Concise"], prog=>'<.>', stderr => 1
+ );
+like $out, '\*<none>::', '<.>';
+
__END__