[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Does "require" work in MacPerl?



At 1:31 PM +0100 9/22/99, Peter Westlake wrote:

>Here's an odd thing:
>
>    require 'URI::URL.pm';
>
>does not work, saying that the file could not be found in @INC, but


You just don't realize what it's looking for.  Since you gave it a 
package name, it appends a .pm and looks for a file :URI:URL.pm.pm in 
@INC.  That's not what you want.  You simply want

require 'URI::URL';

and most of us would leave the quotes off.

require URI::URL;


>
>    use 'URI::URL';
>
>does work. The URI folder is in the standard place, @INC is correct,
>and so on. Maybe the colons are being mistaken for file separators?
>This first went wrong in the middle of XML::Parser, but it behaves
>exactly the same way all by itself.
>
>Peter.

---
Paul J. Schinder
NASA Goddard Space Flight Center
Code 693, Greenbelt, MD 20771
schinder@leprss.gsfc.nasa.gov

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org