emmiesix has asked for the wisdom of the Perl Monks concerning the following question:
I have failed twice to get this to work. I find some niche module on CPAN, which is just a single .pm file containing perl code. Everything looks good, functions are exported, etc. The two packages are initialized thusly:
use Beep;
and, in another attempt in seperate file:
use Local:TeeOutput;
The common point here is that I don't know how to install these in a nice place, so have been testing them out by putting e.g., Beep.pm in the pwd and TeeOutput.pm in ./Local/ . This was what everything I found online told me would work. It does not. I get the following errors when trying to access functions clearly exported within these files:
Undefined subroutine &main::beep called at ./beep.pl line 5.
Previously I had figured out how to make my perl program find the /Local/ directory I had created, and now that I'm writing this I can't repeat that, so my new problem for that case is that @INC seems to be ignoring it's own contents?
Can't locate TeeOutput.pm in @INC (@INC contains: /(my pwd)/ ./ /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./test3.pl line 4. BEGIN failed--compilation aborted at ./test3.pl line 4.
I can post more info, but I have a feeling I'm just doing something very obviously dumb to anyone who knows what's going on.
Thanks for your wonderful site!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Installing perl-only .pm modules locally??
by John M. Dlugosz (Monsignor) on May 12, 2009 at 19:33 UTC | |
|
Re: Installing perl-only .pm modules locally?? (cpan custom lib)
by ikegami (Patriarch) on May 12, 2009 at 21:21 UTC | |
|
Re: Installing perl-only .pm modules locally??
by toolic (Bishop) on May 12, 2009 at 20:30 UTC | |
|
Re: Installing perl-only .pm modules locally??
by John M. Dlugosz (Monsignor) on May 12, 2009 at 19:35 UTC |