use EveryThing;
Perl pretends to have loaded all routines from a data base (a hash tied to a DB_File) and to initialized all packages.
In reality, it waits until a routine is first called and loads it then. Also, package initialisation is delayed until the package is actually used.
Of course, the subtle details between OOP and AUTOLOADING require some attention but I believe that I got it (mostly) right. Maybe I post the module to this site when I have added some documentation and utilities...
Now, I am scared because you write: <quote> and that's guaranteed to break in the future... </quote> This means my module will not work in the future: It relies on the fact that EveryThing will call UNIVERSAL::AUTOLOAD in case it's not yet in the system.
In fact, an older version of the module did some guesswork what modules a piece of code might want to use and initialized AUTOLOAD for all these packages. But this guesswork required some assistance from the programmer in cases like calling a constructor of a variable class. Also, the first code piece called needed some explicit initialisation.
I completely agree that AUTOLOADing via @ISA is not the RightThing. But UNIVERSAL::AUTOLOAD is different because it has an additional useful semantics.
Thanks again for you quick help.
Yaakov
In reply to RE: Re: Switch off warning for UNIVERSAL::AUTOLOAD
by Yaakov
in thread Switch off warning for UNIVERSAL::AUTOLOAD
by Yaakov
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |