On Jan 26, 2004, at 8:38 AM, Jan Eden wrote: [..]
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.

sounds like your package line in the Template.pm file is set as

package Template;

and NOT as

package Test::Template;

Hence what you wanted to do is

        use lib "$ENV{HOME}/Library/Scripts/Modules";
        use Template;
        ...
        my ($update_path, $gallery_title) = &Test::Template::choose();

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.

Yes and no - the yes part is that IF the package line and the file name are set appropriately.

This is one of the reasons that the perldoc advocates
doing the start of a perl module with h2xs

cf perldoc h2xs

so that you can start off at least modestly sanely

my traditional rant on PM's is at
<http://www.wetware.com/drieux/CS/lang/Perl/PM/quick_pm.html>

When I am brewing up a new module, I then of course use
something like

<http://www.wetware.com/drieux/CS/lang/Perl/PM/PerlInstall.plx>

so that i can install the module in my home directory.

ciao
drieux

---


-- 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