in reply to subroutine attributes and ISA
Wrap your @TestObject::ISA setting into a BEGIN block:
BEGIN { our @ISA = qw(Pixie::Object); }
Otherwise the FETCH_CODE_ATTRIBUTES and MODIFY_CODE_ATTRIBUTES subroutines aren't resolvable when your sub foo : override { } gets compiled.
Then, have a look at what your're checking in the "eval" in your Pixie::Object::new - I guess you mean something like
# Do something more extreme? my @attributes = eval "attributes::get(\\\&$class\::$k +ey)"; print "$key : @attributes\n"; warn "$class already has a method $key; this will be u +sed instead of field access." . " Attach attribute override to that method if yo +u would like to suppress this message." unless grep(/^override/,@attributes);
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: subroutine attributes and ISA
by hoelzro (Novice) on Jul 14, 2007 at 20:18 UTC | |
by shmem (Chancellor) on Jul 16, 2007 at 11:18 UTC |