X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FAttribute%2FHandlers.pm;h=d4cbfffc25d5de5672591c28c1c390b68b669f3f;hb=235bddc8d16c512a7d89f327f65cee68b1f5848c;hp=f12d1d98556e96a006d6e4aef43c812b4becd3ff;hpb=0e9b9e0c7863a4aa06abc0b0023a705f8fb03761;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Attribute/Handlers.pm b/lib/Attribute/Handlers.pm index f12d1d9..d4cbfff 100644 --- a/lib/Attribute/Handlers.pm +++ b/lib/Attribute/Handlers.pm @@ -145,7 +145,11 @@ sub _gen_handler_AH_() { _apply_handler_AH_($decl,$gphase) if $global_phases{$gphase} <= $global_phase; } - push @declarations, $decl; + # if _gen_handler_AH_ is being called after CHECK it's + # for a lexical, so we don't want to keep a reference + # around + push @declarations, $decl + if $global_phase == 0; } $_ = undef; }