Foo Ji-Haw wrote:

I don't think it's more difficult to call a require(), use() helps in the bigger scheme of things, like determining the scope of your variables and methods, and making sure you package similar functions together. use() also makes sure at compile time that the libraries are available, whereas require() only checks at runtime.

There's more to the difference between the two, and you may want to read up the documentation for the details.

According to the documentation, use Module is just:

   BEGIN { require Module; import Module; }

So, the only differences between the two are:

   * use() always happens at compile time (which seems to cause more
     trouble than it solves)
   * use() calls the import function in the module (which would
     probably be empty, for a class module)
   * use() requires that you use a bareword for the module name (might
     be nice, if I could solve the @INC path problem)

--
Lyle Kopnicky
Software Project Engineer
Veicon Technology, Inc.


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to