Subject: | MODIFY_CODE_ATTRIBUTES consumes even unsupported attributes |
MODIFY_CODE_ATTRIBUTES does uncoditional 'undef $attr' while iterating
over attributes, and due to this always returns empty list.
Later, closure created in import() doesn't call original
MODIFY_CODE_ATTRIBUTES from target module, because @unhandled is always
empty on second iteration.
Patch to fix this problem is attached.
Subject: | class-std-modify_code.patch |
--- Std.pm-orig 2009-05-26 14:45:50.000000000 +0400
+++ Std.pm-orig-fixed 2009-05-26 23:42:32.000000000 +0400
@@ -199,6 +199,9 @@
elsif (exists $OVERLOADER_FOR{$attr}) {
push @{$overload{$package}}, [$referent, $attr];
}
+ else {
+ next;
+ }
undef $attr;
}
return grep {defined} @attrs;