Jump to content

Can't locate Syntax/Keyword/Try.pm in @INC


Recommended Posts

I'm trying to import logs into a game stats program and am getting an error:

C:\WINDOWS\system32>type C:\xampp\htdocs\ggturbo.ddns.net\cstrike\logs *.log | C:\xampp\perl\bin\perl.exe C:\xampp\scripts\hlstats.pl -s -t --norcon --server-ip 192.168.1.10 --server-port 27015

C:\xampp\htdocs\ggturbo.ddns.net\cstrike\logs \l0102000.log

Can't locate Syntax/Keyword/Try.pm in @INC (you may need to install the Syntax::Keyword::Try module) (@INC contains: C:/xampp/perl/site/lib C:/xampp/perl/vendor/lib C:/xampp/perl/lib) at C:/xampp/scripts/HLstats_Server.pm line 41. BEGIN failed--compilation aborted at C:/xampp/scripts/HLstats_Server.pm line 41. Compilation failed in require at C:\xampp\scripts\hlstats.pl line 75. The process tried to write to a nonexistent pipe.

I verified that the Syntax::Keyword::Try module is installed.

HLstats_Server.pm line 41:

use Syntax::Keyword::Try;

hlstats.pl line 75:

require "$opt_libdir/HLstats_Server.pm";

I tried adding...

use lib 'C:/xampp/perl/vendor/lib/Log/Report/Dispatcher';
use Syntax::Keyword::Try;

2023-05-01_095302.png.4ecfff78eda248737701b128a2f5cd39.png

Link to comment
Share on other sites

Did you install Try into that Dispatcher? Try looks like a module by itself - as in it's a separate install, and I assume it should end up in some Syntax\Keyword\ directory (and not part of your vendor\).

Link to comment
Share on other sites

4 hours ago, requinix said:

Did you install Try into that Dispatcher? Try looks like a module by itself - as in it's a separate install, and I assume it should end up in some Syntax\Keyword\ directory (and not part of your vendor\).

I'm using ActivePerl-5.24.3.2404-MSWin32-x64-404865. I don't know of ant way to specify where to install modules. I guess PPM just installs them wherever it wants 🤔

Edited by bobl61
Link to comment
Share on other sites

AHA! That got me thinking. Xampp installed Try into that directory. ActivePerl installed it in it's own library. So I changed:

type C:\xampp\htdocs\ggturbo.ddns.net\cstrike\logs *.log | C:\xampp\perl\bin\perl.exe C:\xampp\scripts\hlstats.pl -s -t --norcon --server-ip 192.168.1.10 --server-port 27015

to:

type C:\xampp\htdocs\ggturbo.ddns.net\cstrike\logs\*.log | C:\Perl64\bin\perl.exe C:\xampp\scripts\hlstats.pl -s -t --norcon --server-ip 192.168.0.10 --server-port 27015

and BAM! The logs were imported successfully. Thanks, @requinix, as always 😉

Edited by bobl61
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.