So I am sure whats going on, can you elaborate on why this is the fix? For example, the error asked for MIME/Lite.pm so I gave it the path to the file. Here you are stating that I should just go up to the point where I am mapping:
/home/samcsm/jason/myperl/lib/perl5/site_perl/
Basically (I'm omitting some advanced techniques here), @INC contains a set of directories (and CODEREFs). Those directories are searched when a module is used/required. The way perl searches is basically
1. $module_name =~ s/::/$pathsep/ eg MIME::Lite becomes MIME/Lite 2. append extension eg MIME/Lite.pm 3. foreach $dir in @INC if -e $dir/MIME/Lite.pm load it end if end foreach die if no module found
Actually, I think there is a better psuedo code example in `perldoc -f require`
*/"Randy W. Sims" <[EMAIL PROTECTED]>/* wrote:
jason corbett wrote: > Here is where I am in the process: > > I have MIME::Lite located on the server in a folder called /home/samcsm/jcorbett/myperl/lib > > I use this simple script to test out emailing a query below and get the error stating that "cannot find MIME/Lite.pm' anywhere. > > Now mind you I have MIME/Lite.pm installed in > > /home/samcsm/jcorbett/myperl/lib/perl5/site_perl/MIME/Lite.pm > > Can you tell me whats wrong? > > #!/usr/bin/perl > use warnings; > use strict; > use DBI; > use MIME::Lite; > > BEGIN{ > unshift (@INC, '/home/samcsm/jason/myperl/lib/perl5/site_perl/MIME/Lite.pm');}
unshift (@INC, '/home/samcsm/jason/myperl/lib/perl5/site_perl/');}
or more simply
use lib '/home/samcsm/jason/myperl/lib/perl5/site_perl/'; use MIME::Lite;
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>