Thanks to you help, I finished now version 0.1 of the "EveryThing" module: After

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.