in reply to subroutine attributes and ISA

Attributes are determined and resolved at compile time (attributes::import is called when foo : override {} gets compiled). At that time, your derived class doesn't have @ISA set.

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
    I put the our @ISA part into a BEGIN block, but the same error message comes up.
      I put the our @ISA part into a BEGIN block, but the same error message comes up.

      in TestObject.pm change

      require Pixie::Object;

      to

      use Pixie::Object;

      That should do.

      --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}