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

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



Pete,

You wrote:

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



Here's an excerpt from perlmod that may help explain why:

> The two statements: 
> 
>    require SomeModule;
>    require "SomeModule.pm";            
> 
> differ from each other in two ways. In the first case, any
> double colons in the module name, such as Some::Module, are
> translated into your system's directory separator, usually
> ``/''. The second case does not, and would have to be
> specified literally...

(I left off the second difference, because it's not relevant.)

Hope this clears things up for you.

jay

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