You are not logged in.
After the recent perl update, running a perl program (which is no longer maintained), I get:
do "setting.rc" failed, '.' is no longer in @INC; did you mean do "./setting.rc"? at /dp/gg25/guiguts.pl line 347.
15which: no onsgmls in (/home/mark/perl5/bin:/home/mark/perl5/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/adobe-air-sdk/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:pptools:pptools)
do "data/labels_en_default.rc" failed, '.' is no longer in @INC; did you mean do "./data/labels_en_default.rc"? at /dp/gg25/guiguts.pl line 347.
do "data/labels_en.rc" failed, '.' is no longer in @INC; did you mean do "./data/labels_en.rc"? at /dp/gg25/guiguts.pl line 347.
A problem was encountered when reading data/labels_en.rc. Using default values.The relevant lines of guiguts.pl are:
sub dofile {
my $filename = shift;
return do $filename;
}Is there a way to fix these lines to include an explicit path to wherever $filename happens to be?
Thanks for any help.
[Edited to add:] Including the dot at the beginning of the script "works":
use lib '.';, but I'd rather do it the right way if there's a better one.
Last edited by Henry Flower (2017-06-15 07:38:26)
Offline
Maybe something like this will do.
sub dofile {
my $filename = "$ENV{PWD}/" . shift;
return do $filename;
}Offline
Thanks for the suggestion. It's certainly a step in the right direction. This time the error message is:
15which: no onsgmls in (/home/mark/perl5/bin:/home/mark/perl5/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/adobe-air-sdk/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:pptools:pptools)
A problem was encountered when reading data/labels_en.rc. Using default values.Settings which are stored in the setting.rc file are not active, however; they do work with the "use lib '.';" method.
[Edited to add:] On further investigation, I've found that the suggested solution does work, including setting and loading the settings from setttings.rc, provided I run perl /dp/gg25/guiguts.pl from within the /dp/gg25 directory; running the same command from another directory produces the "A problem was encountered when reading data/labels_en.rc. " noted above. I don't understand why, but as I have a solution that works, I'll call it solved. Thanks again.
Last edited by Henry Flower (2017-06-15 07:46:03)
Offline