> Proposal to rename C<import> and C<unimport>

The problem with this is that they rely on the indirect object notation,
same as new(). So:

   import Module;     # calls Module->import
   new Module;        # calls Module->new
   bob Module;        # calls Module->bob
  
So import and unimport aren't really special functions. In fact, there's
nothing special about import, except that "use" automatically calls it.
If you use the Exporter, it takes care of import for you automagically.

It's a real problem because as the docs say, "use Module" is exactly the
same as:

   BEGIN { require Module; import Module; }

but use and require are special keywords, whereas import is not. Blech,
I'm getting a headache. :-{

Basically if we changed the name we'd have to write:

   require Module;
   IMPORT Module;

Unless we created a new keyword "import" which called Module->IMPORT
(probably the cleanest and most consistent).

-Nate

Reply via email to