> my ($update_path, $gallery_title) = &Test::Template::choose();

Can I assume that your module has the line "package Test::Template;" at the
top of the file?  If not, that is why.

> use Test::Template;

This says "load {lib directory}/Test/Template.pm.

> &Test::Template::choose();

This says "execute choose() in the Test::Template package".

Rob


-----Original Message-----
From: Jan Eden [mailto:[EMAIL PROTECTED]
Sent: Monday, January 26, 2004 11:39 AM
To: Perl Lists
Subject: Placing handmade modules


Hi all,

I use the following code to use a module I made:

use lib "$ENV{HOME}/Library/Scripts/Modules";

use Test::Template;

my ($update_path, $gallery_title) = &Test::Template::choose();

The module sits in /Users/jan/Library/Scripts/Modules/Test. Now Perl tells
me it cannot locate the subroutine "choose". If I place Template.pm directly
into the path set in the "use lib" line and remove the "Test::" at both
places, everything works fine.

I read in the camel that double colon separators in a module name would be
translated to a directory structure when Perl searches for them.

Why doesn't Perl do it for me?

Thanks,

Jan
-- 
How many Microsoft engineers does it take to screw in a lightbulb? None.
They just redefine "dark" as the new standard.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to