I’m trying to parse a MYSQL slow query log from the command line.
Upon entering this:
set PATH=G:\xampp\perl\bin\;%PATH%
cd /d G:\xampp\mysql\scripts
perl mysqldumpslow.pl -s c -t 10
The shell returns an error can't locate strict.pm in @INC (@INC contains: .) at mysqldumpslow.pl at line 8. BEGIN failed
In the perl directory in xampp, there is only one file perl.exe.
Am I missing perl modules/libraries? What do I need to read this log file?
A workaround is to find the location of
strict.pmin your perl installation and to add the directory to thePERL5LIBenvironment variable, or to invokeperlwith the-I/path/to/strict.pm/directoryoption (seeperlfaq8: How do I add a directory to my include path (@INC) at runtime?).If you find more unsatisfied dependencies, keep adding directories to
PERL5LIBor with additional-Ioptions until your program can run.(Though eventually you will probably get tired of this and fix/reinstall perl.)
UPDATE: Looking through the 1.7.3 XAMPP distribution, all of the perl library files are located under
xampp\perl\libandxampp\perl\site\lib, sois probably all that you need to do. YMMV if you have an older XAMPP distribution.