in reply to Re^3: Subroutines with differing behaviour created from AUTOLOAD
in thread Subroutines with differing behaviour created from AUTOLOAD

Filehandle?? Nonono. Read up on do. Basically, it's a way of wrapping a block around an assignment, kinda like what I've done there. The idea is to directly access the symbol table using a soft (or symbolic) reference to find the %__EDITABLE__ hash in the class of the object being used. This way, we don't have to hardcode the classname in.

Better yet would be to provide a method (called editable()?) which would return those values. This would play nicer with inheritance. Of course, the best solution is to have something that walks the @ISA tree, but that gets more complicated.

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested

  • Comment on Re^4: Subroutines with differing behaviour created from AUTOLOAD