stakor
asked on
Perl Module Question
I am trying to use a module in my perl script. I do not have access to the directories that are in perl's search path however. How do I include a perl module in my script when I don't have permission to put it in the path that perl searches?
I would like to use:
use BlahThing;
where BlahThing.pm has all of my variables. My BlahThing.pm module is in the same directory as my script.
I would like to use:
use BlahThing;
where BlahThing.pm has all of my variables. My BlahThing.pm module is in the same directory as my script.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Is $drop_dir defined in BlahThing? If so, did you export it?
Is BlahThing defined as a module or is it simply a library file?
Is BlahThing defined as a module or is it simply a library file?
ASKER
Global symbol "$work_tar_dir" requires explicit package name at BlahThing.pm line 15.
Compilation failed in require at /home/username/script.pl line 14.
BEGIN failed--compilation aborted at /home/username/script.pl line 14.
The first part of the script is below (Minus comments):
#!/usr/bin/perl
#
#
#
#
#
use strict;
use warnings;
#
use lib '.';
use BlahThing;
use File::Basename;
#
chdir($drop_dir) or die "Cant chdir to $drop_dir $!";