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

[MacPerl-Modules] whatup with module spaces & paths?



Hi gang,

Using MacPerl 5.20r4 (patchlevel 5.004). I am *embarrassed* to ask such a
simple question, but it's haunting me... It's a question about the pathname
inclusions, 'use' and 'use lib' commands, why Makefile.PL doesn't seem to
work for me on MacPerl (even when I change "/" to ":" in pathname
specifications).

I'm specifically trying to use the DBI module, which seems promising, since
I need SQL access through MacPerl.

Let me be REAL clear. In the MacPerl:lib directory, I dropped the DBI:
folder, which contains other subfolders Bundle:, DBD: DBI: and Win32: as
well as some admin folders and files (e.g., XS files). I copied the DBI.pm
out of there and into the MacPerl:lib file, in the same way as with CGI.pm,
whose structure is like this:

MacPerl:
 lib:
   ...              -- [misc MacPerl:lib files, folders & modules]
   CGI.pm           -- the main CGI.pm file
   CGI:             -- the main CGI directory
     Apache.pm      -- the various CGI support modules
     Carp.pm
     Fast.pm
     Push.pm
     Switch.pm

Since


But I run a one-line source file like this:

#!/usr/bin/perl
use DBI;

and I get this:
# Can't find loadable object for module DBI in @INC (Macintosh
HD:MacHTTP:MacPerl:lib:MacPPC Macintosh HD:MacHTTP:MacPerl:lib Macintosh
HD:MacHTTP:MacPerl Macintosh HD:MacHTTP:MacPerl:lib:MacPPC Macintosh
HD:MacHTTP:MacPerl:lib  Dev:Pseudo)
File 'Macintosh HD:MacHTTP:MacPerl:lib:DBI.pm'; Line 0
# BEGIN failed--compilation aborted.
File 'Macintosh HD:MacHTTP:MacPerl:lib:DBI.pm'; Line 158
# BEGIN failed--compilation aborted.
File 'Untitled'; Line 2

...and that ain't cool. I can appreciate MacPerl not being able to see DBI
from @INC, but I need a way to set DBI up folder-wise so it CAN see it.
Suggestions?

BTW, the same problem goes for all my other sub-folder modules too, e.g.,
for Apache.pm inside Lincoln Stein's CGI folder; I get the same error or a
similar (e.g., "Can't locate Apache.pm in @INC") error message, with any 1
of these:

use Apache;
use 'CGI::Apache';
use CGI::Apache;

Using 'use lib' doesn't seem to help, neither does adding the DBI directory
to my path (@INC) via the Preferences menu or outright changing @INC via
unshift @INC, "lib"; etc..

I guess I really need to learn about MacPerl's `use` system and its
relation to lib folder structures, right?

Thanks in advance,
Frank.



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