Perl debugger error # C:/Perl/lib/Term/ReadLine/Perl.pm line 65 - perl

I'm having a strange error trying to run a Perl script with ActivePerl on Windows XP:
>perl -d quick_translate_missing.pl < translate_en.txt > new.txt
Loading DB routines from perl5db.pl version 1.33
Editor support available.
Enter h or `h h' for help, or `perldoc perldebug' for more help.
main::(quick_translate_missing.pl:9):
9: my $not_translated = '\'EN_([\w\s]+)\'';
El sistema no puede hallar la ruta especificada.
Unknown error
Compilation failed in require at C:/Perl/lib/Term/ReadLine/Perl.pm line 65.
at C:/Perl/lib/Term/ReadLine/Perl.pm line 65
Term::ReadLine::Perl::new('Term::ReadLine', 'perldb', 'GLOB(0x1968f34)',
'GLOB(0x1927e7c)') called at C:/Perl/lib/perl5db.pl line 6068
DB::setterm called at C:/Perl/lib/perl5db.pl line 2241
DB::DB called at quick_translate_missing.pl line 9
Attempt to reload Term/ReadLine/readline.pm aborted.
Compilation failed in require at C:/Perl/lib/Term/ReadLine/Perl.pm line 65.
END failed--call queue aborted at quick_translate_missing.pl line 65.
at quick_translate_missing.pl line 65
"El sistema no puede hallar la ruta especificada." means "System cannot find the specified path". The line the error is referring to is from Perl.pm:
eval {require Term::ReadLine::readline}; die $# if $#;
What I understand is that it cannot find Term::ReadLine::readline, but the file C:\Perl\lib\Term\ReadLine\readline.pm is there. Also PATH is set correctly since I can run perl interpreter from anywhere without specifing the path.
The error happens only when using standard output redirection (>). Script passed to debugger doesn't matter, it crashes on all if output redirection used.
Any clues? Thanks in advance!

This may not help you if you must have a specific perl version, but I found this same error with my perl 5.8.5 install. I could not upgrade on one machine (for legacy code reasons), but I ran it in another perl environment with the latest perl (v5.14.2) and this "debugger" bug has been solved (although I suspect you may have the same result by updating the Term::ReadLine::* modules as well). By the way, this isn't specific to ActivePerl -- I saw this on Linux as well.

Related

Unable to build Perl module Net::MAC::Vendor

I am unable to build Net::MAC::Vendor on a Mac w/ High Sierra. I am relatively new to Perl but have built modules in the past. The error appears to be:
Failed fetching [https://services13.ieee.org/RST/standards-ra-web/rest/assignments/download/?registry=MA-L&format=html&text=14-10-9F] HTTP status []
message [IO::Socket::SSL 2.009+ required for TLS support] at t/fetch_oui_from_custom.t line 21.
Could not fetch data from the IEEE! at t/fetch_oui_from_custom.t line 21.
# Failed test ''Got back array reference' isa 'ARRAY''
# at t/fetch_oui_from_custom.t line 23.
# 'Got back array reference' isn't defined
# Failed test 'Fetched Apple's OUI entry'
# at t/fetch_oui_from_custom.t line 25.
# ''
# doesn't match '(?^:Apple, Inc\.)'
# Looks like you failed 2 tests of 2.
t/fetch_oui_from_custom.t .. 2/?
# Failed test 'fetch'
# at t/fetch_oui_from_custom.t line 27.
Use of uninitialized value in concatenation (.) or string at /Users/johnprokopek/.cpan/build/Net-MAC-Vendor-1.265-13/blib/lib/Net/MAC/Vendor.pm line 320.
Failed fetching [http://standards.ieee.org/cgi-bin/ouisearch?14-10-9F] HTTP status []
Can someone help, thanks
I'm also still on High Sierra (10.13.6), on an ancient-but-still-running Mac Mini mid-2010. Using the built-in /usr/bin/perl (v5.18.2), running install Net::MAC::Vendor inside the CPAN shell gave me the same error. Running force install Net::MAC::Vendor worked, in that the module was installed.
A simple perl -MNet::MAC::Vendor -e "print 'hi'" works, so it looks like Perl can at least load that library, not really sure how to test that it works for real. But, at least this will let you install it and try it.

Eclipse: getting IO exception when stepping through perl code

I'd like to debug a perl program in Eclipse, but every time I open the debugger, and press the step-over button (or the step into button for that matter), I get a Dialog box saying "PerlDebugJob has encountered a problem". It then gives the following:
An IOException occurred while executing debugger command
could not match re.IP_POS in {recv() is deprecated on :utf8 handles. This will be a fatal error in Perl 5.30 at C:/Strawberry/perl/lib/IO/Socket.pm line 304.
at C:/Strawberry/perl/lib/IO/Socket.pm line 304.
IO::Socket::recv(IO::Socket::INET=GLOB(0x33d6238), "", 2048) called at C:/Users/John/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl line 7358
DB::readline(" DB<16> ") called at C:/Users/John/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl line 1858
DB::_DB__read_next_cmd(undef) called at C:/Users/John/workspace/.metadata/.plugins/org.epic.debug/perl5db.pl line 2786
DB::DB called at F:/Shared/John/Java/unifdef+.0.2.1/test.pl line 4
main::(F:/Shared/John/Java/unifdef+.0.2.1/test.pl:4):
4: my $rundir = "script\/";}
I am running Eclipse Neon.3, and I just installed Padwalker through a cpan padwalker command on my DOS prompt. My perl is 5.26.0. Is there anything else I have to do? (I tried a more recent version of Eclipse with the same results).
The first few lines of the program I am trying to debug are:
use File::Compare;
my $result;
my $rundir = "script\/";

Perl module broke my windows xampp installation

PROBLEM: In the process of trying to install gitstat on a Windows7 machine I broke my xampp Apache installation. Now I can't get gitstat or apache to work.
APACHE ERROR:
[error] Can't load Perl file: C:/xampp/apache/conf/extra/startup.pl for server localhost:80, exiting...`
Other people have reported this issue being caused by the PERL5LIB environment variable, but that variable does not exist on my machine.
WHAT I DID / GITSTAT ERROR:
I needed the SOAP::Lite module installed so I followed the windows guide here: http://soaplite.com/install.html
As far as I could tell I installed the module successfully, console output below
cpan[1]> install SOAP::Lite
CPAN: Storable loaded ok (v2.21)
Going to read '\xampp\perl\bin\.cpan\Metadata'
Database was generated on Wed, 27 Jun 2012 02:47:03 GMT
SOAP::Lite is up to date (0.714).
I saw a SOAP directory in perl/site/lib which (to me) means that the module should be available. When I look in my perllocal.pod file SOAP:Lite is in there.
Part of the gitstat installation instructions say to copy the Lite.pm file from perl/site/lib/SOAP into gitstat\gstat_pl\lib
However, when I try to perform step nine of gitstat installation (perl gitstat.pl HEAD) I get the following:
C:\xampp\htdocs\gitstat\gstat_pl>perl gitstat.pl HEAD
Supported versions:
BEGIN failed--compilation aborted at C:/xampp/perl/site/lib/SOAP/Lite.pm line 34
86.
Compilation failed in require at C:/xampp/perl/site/lib/SOAP/Constants.pm line 1
3.
BEGIN failed--compilation aborted at C:/xampp/perl/site/lib/SOAP/Constants.pm li
ne 13.
Compilation failed in require at lib/Lite.pm line 3444.
BEGIN failed--compilation aborted at lib/Lite.pm line 3444.
Compilation failed in require at gitstat.pl line 30.
If I don't copy the file from perl/site/lib/SOAP then I get
C:\xampp\htdocs\gitstat\gstat_pl>perl gitstat.pl HEAD
Can't locate lib/Lite.pm in #INC (#INC contains: C:/xampp/perl/lib C:/xampp/perl
/site/lib .) at gitstat.pl line 30.
I don't understand why CPAN didn't install the Lite.pm module in the #INC path or why the compilation might fail when the module is available, or most importantly why my Apache install is broken. Also I'm very new to Perl and CPAN and my understanding of Apache is primitive so simpler explanations would be greatly appreciated.

Why do I get "version (5.12.2) doesn't match executable version" with Perl's PAR?

When I run the following to create an executable out of my Perl script:
pp -o process_target_mode_data Process_Target_Mode_Data.pl
I get the following error output:
Perl lib version (5.12.2) doesn't match executable version (v5.12.0) at /home/Neil/ActivePerl-5.12/lib/Config.pm line 50.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
Compilation failed in require at -e line 459.
/home/Neil/ActivePerl-5.12/site/bin/pp: Failed to extract a parl from 'PAR::StrippedPARL::Static' to file 'parleNrP2Xi' at /home/Neil/ActivePerl-5.12/site/lib/PAR/Packer.pm line 1172, <DATA> line 1.
Could someone explain to me what is going on and how I can resolve this problem?
Info brian d foy requested:
[bash-3.2][Neil#willy]$ which pp
/home/Neil/ActivePerl-5.12/site/bin/pp
[bash-3.2][Neil#willy]$ /home/Neil/ActivePerl-5.12/site/bin/pp -o process_target_mode_data Process_Target_Mode_Data.pl
Perl lib version (5.12.2) doesn't match executable version (v5.12.0) at /home/Neil/ActivePerl-5.12/lib/Config.pm line 50.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
Compilation failed in require at -e line 459.
/home/Neil/ActivePerl-5.12/site/bin/pp: Failed to extract a parl from 'PAR::StrippedPARL::Static' to file 'parludZfldz' at /home/Neil/ActivePerl-5.12/site/lib/PAR/Packer.pm line 1172, line 1.
[bash-3.2][Neil#willy]$
[bash-3.2][Neil#willy]$ /home/Neil/ActivePerl-5.12/bin/cpan -l | grep PAR
PAR 1.002
PAR::Dist 0.47
PAR::Heavy 0.12
PAR::Filter 0.03
PAR::SetupTemp 1.002
PAR::SetupProgname 1.002
PAR::Packer 1.006
PAR::StrippedPARL::Dynamic 0.958
PAR::StrippedPARL::Static 0.958
PAR::StrippedPARL::Base 0.975
PAR::Filter::Bytecode undef
PAR::Filter::Bleach undef
PAR::Filter::Obfuscate undef
PAR::Filter::PatchContent undef
PAR::Filter::PodStrip undef
App::Packer::PAR 0.91
Perl lib version (5.12.2) doesn't match executable version (v5.12.0)
Some parts of your Perl installation are at a different version than others. More specifically, if you look at /home/Neil/ActivePerl-5.12/lib/Config.pm line 50, you will see that there is an explicit comparison of the version of Perl being executed (which is 5.12.0) to the version of the Config.pm library being used (5.12.2).
If you perform a new installation of ActivePerl 5.12.2 (to bring all components up to the same version), this error should go away.
I had same issue. I installed PAR::Packer from Activestate Perl Package Manager (PPM). As mentioned above in one of the replies, there is version mismatch between the perl and pp binaries. Here's how I fixed it:
Uninstall PAR-Packer from PPM.
Open DOS command line.
Run cpan install PAR::Packer
This will download, compile, and install the package from CPAN. MinGW compiler toolchain will be downloaded as well, if needed. The whole process may take a while on slower cpus.
Find the location of that pp, then figure out its version. I bet it's left over from an earlier installation. Ensure that you have PAR for your new version of Perl.
You can also try specifying the location of the particular pp you want to use so you know exactly what one you are using:
$ /full/path/to/5.12.2/pp ...
Go to the perl/lib/Config.pm and changed the condition in the lines:
die "$0: Perl lib version (5.32.0) doesn't match executable '$^X' version ($])" unless $^V;
to
die "$1: Perl lib version (5.32.1) doesn't match executable '$^X' version ($])" unless $^V;
and the next line
$^V eq 5.32.0 or die sprintf "%s: Perl lib version (5.32.0) doesn't match executable '$^X' version (%vd)", $0, $^V;
to
$^V eq 5.32.1 or die sprintf "%s: Perl lib version (5.32.1) doesn't match executable '$^X' version (%vd)", $0, $^V;
this worked for me, at least it won't complain... yes, i know, PERL and Python are f***d up.

Perl XS included from a “use lib” directory can’t be found by ISAPI

I have a Perl web application that runs on both Apache and IIS6 on Windows Server 2003. On Apache this script works just fine. In IIS using ISAPI, I am getting the following error message:
Software error:
Can't load
'lib/auto/Sub/Name/Name.dll' for
module Sub::Name: load_file:The
specified module could not be found at
C:/Perl/lib/DynaLoader.pm line 230.
at lib/DBIx/Class/Schema.pm line 10
Compilation failed in require at
lib/DBIx/Class/Schema.pm line 10.
BEGIN failed--compilation aborted at
lib/DBIx/Class/Schema.pm line 10.
Compilation failed in require at (eval
39) line 3. ...propagated at
C:/Perl/lib/CGI/Carp.pm line 314.
BEGIN failed--compilation aborted at
My/Schema.pm line 2. Compilation
failed in require at...
When NOT using ISAPI in IIS it runs fine. We would prefer to continue using ISAPI in our IIS environments. Why can't it find this module, even though it does when running normal Perl?
EDIT:
We were calling it with relative paths.
use lib qw{My lib}; # line in question
use My::Schema; # explodes
Mobrule, your comment enlightened us. The relative path was different between using the vanilla Perl interpreter and ISAPI.
use lib qw{My /Inetpub/wwwroot/cgi/lib}; # a little more specific...
use My::Schema; # not nearly as much dying now.
Thanks for the help!