Lori713 has asked for the wisdom of the Perl Monks concerning the following question:
I've got a large file I'm considering upgrading from 5.005 to 5.6.1, and was curious about what kind of "errors" I might see. So, I changed my shebang link from "perl5" to "perl5_6_1" (which is how our directories on the Unix box are labeled - see below). I telnet'd to the Unix box to do a syntax check and I got the following error message:
/local/www/scripts/>perl -c nc_pf_56mainmenu.pl
Content-type: text/html
Software error:
Wed Sep 10 09:57:00 2003 CTlib.pm: Can't locate Sybase/CTlib.pm in @INC
(@INC contains: /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .)
at nc_pf_56mainmenu.pl line 12.
BEGIN failed--compilation aborted at nc_pf_56mainmenu.pl line 12.
I confirmed that the Sybase::CTLIB is in the following paths:
usr/local/lib/perl5/site_perl/Sybase/CTlib.pm
usr/local/lib/perl_5_6_1/site_perl/Sybase/CTlib.pm
I understand that the @INC is where the program will go look for stuff (and I think I already know how to push a directory onto @INC because I've had to look it up in here before), but my question is...
Why is it pointing to those old directories when I tell it the perl_5_6_1 directory in the shebang line?
My current (erroring) shebang line is: #!/usr/local/bin/perl5_6_1
The following works for the 5.0 version: #!/usr/local/bin/perl5
BTW, I also tried a "perl -d myfilename.pl" and plain old "perl myfilename.pl" just to see what would happen... I get the same error messages.
Thanks for any insights you can provide.
Lori
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Error on converting 5.0 script to 5.6 script
by edan (Curate) on Sep 10, 2003 at 14:41 UTC | |
by dragonchild (Archbishop) on Sep 10, 2003 at 15:52 UTC | |
|
Re: Error on converting 5.0 script to 5.6 script
by Zaxo (Archbishop) on Sep 10, 2003 at 14:35 UTC | |
|
Re: Error on converting 5.0 script to 5.6 script
by Lori713 (Pilgrim) on Sep 10, 2003 at 15:11 UTC |