in reply to Re^2: Can't locate loadable module error for XML::LibXSLT on Strawberry Perl
in thread Can't locate loadable module error for XML::LibXSLT on Strawberry Perl

I'm not very familiar with pp, since I haven't used it much myself. However, I think what might be happening is that your Perl environment is looking in some places for Perl modules that pp apparently is not.

Try to locate the LibXSLT.pm file on your system. It should be somewhere under the directory that Perl was installed into. Based on your error message, it will be in a folder named XML. The folder that the XML folder is in should have some other folders and possibly some .pm files too from other modules. This folder's full path is the path that you need to tell pp to include in it's search path for modules by using the -I (or --lib) option.

One more quick note. Hopefully that path does not have any blank spaces in a folder/directory name. If it does, you'll probably need to encapsulate the path in double-quotes.

Hopefully, this should fix your problem. By the way, have you tested the script itself? If not, you should do so. I don't believe that the module that you're trying to use is a core module. If it wasn't bundled in the Strawberry Perl distribution, you'll need to install it. (If you can't find the LibXSLT.pm file on your system, that's a good indication that you don't have the module installed.)

Replies are listed 'Best First'.
Re^4: Can't locate loadable module error for XML::LibXSLT on Strawberry Perl
by Anonymous Monk on Aug 21, 2010 at 00:41 UTC
    LibXML/LibXSLT comes with strawberryperl 5.12

    If you use

    unzip -d test test.exe
    you can see exactly every file that was packed (you could get similar list with verbose option ( pp -v)

    For me using

    use XML::LibXSLT; print `Listdlls.exe $$`; # sysinternals.com
    shows plenty of files files that pp doesn't pack, that you have to add manually . Its all the files outside of the perl directory, namely lib*xsl* , as usually you can ignore the \WINDOWS files
    Base Size Version Path 0x00400000 0xa000 D:\strawberry\perl\bin\perl.ex +e 0x7c900000 0xb2000 5.01.2600.5755 C:\WINDOWS\system32\ntdll.dll 0x7c800000 0xf6000 5.01.2600.5781 C:\WINDOWS\system32\kernel32.d +ll 0x68a40000 0x157000 D:\strawberry\perl\bin\perl512 +.dll 0x77dd0000 0x9b000 5.01.2600.5755 C:\WINDOWS\system32\ADVAPI32.D +LL 0x77e70000 0x92000 5.01.2600.5795 C:\WINDOWS\system32\RPCRT4.dll 0x77fe0000 0x11000 5.01.2600.5834 C:\WINDOWS\system32\Secur32.dl +l 0x773d0000 0x103000 6.00.2900.5512 C:\WINDOWS\WinSxS\x86_Microsof +t.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce8 +3\COMCTL32.DLL 0x77c10000 0x58000 7.00.2600.5512 C:\WINDOWS\system32\msvcrt.dll 0x77f10000 0x49000 5.01.2600.5698 C:\WINDOWS\system32\GDI32.dll 0x7e410000 0x91000 5.01.2600.5512 C:\WINDOWS\system32\USER32.dll 0x77f60000 0x76000 6.00.2900.5912 C:\WINDOWS\system32\SHLWAPI.dl +l 0x71ab0000 0x17000 5.01.2600.5512 C:\WINDOWS\system32\WS2_32.DLL 0x71aa0000 0x8000 5.01.2600.5512 C:\WINDOWS\system32\WS2HELP.dl +l 0x6cec0000 0x10000 D:\strawberry\perl\bin\libgcc_ +s_sjlj-1.dll 0x21070000 0x10000 D:\strawberry\perl\lib\auto\Da +ta\Dumper\Dumper.dll 0x25230000 0xc000 D:\strawberry\perl\lib\auto\IO +\IO.dll 0x01250000 0x5e000 D:\strawberry\perl\vendor\lib\ +auto\XML\LibXML\LibXML.dll 0x70400000 0x114000 D:\strawberry\c\bin\libxml2-2_ +.dll 0x6a540000 0xe8000 1.13.0001.0000 D:\strawberry\c\bin\libiconv-2 +_.dll 0x692c0000 0x19000 1.02.0003.0000 D:\strawberry\c\bin\libz_.dll 0x1f250000 0x15000 D:\strawberry\perl\vendor\lib\ +auto\XML\LibXSLT\LibXSLT.xs.dll 0x660c0000 0x15000 D:\strawberry\c\bin\libexslt-0 +_.dll 0x6e980000 0x36000 D:\strawberry\c\bin\libxslt-1_ +.dll
      How do I add the files I need while creating exe? I tried "-A" option but "pp" complains.
      C:\>pp -A C:\strawberry\perl\vendor\lib\auto\XML\LibXSLT\LibXSLT.xs.dl +l --lib=c:\strawberry\perl\vendor\lib\XML -o testexe test.pl No Perl script found in input

        You shouldn't need to do that, which version of PAR/PAR::Packer do you have installed?

        This works for me using the latest, PAR: 1.002 PAR::Packer: 1.006.

        pp -M XML::LibXML -M XML::LibXSLT -l libgcc_s_sjlj-1.dll -l libxml2-2 +_.dll -l libiconv-2_.dll -l libz_.dll -l libexslt-0_.dll -l libxslt-1 +_.dll -e "print $_,$/ for keys %INC"
        Then after unzip -d foo a.exe you can see all the packed files, but i'll just show the dlls so you can see pp does the correct thing with little help
Re^4: Can't locate loadable module error for XML::LibXSLT on Strawberry Perl
by srinimg (Initiate) on Aug 22, 2010 at 01:36 UTC
    Thanks for your suggestion. I tried all that but still no use
    The XML::LibXSLT module is available with the installation. My perl script is working perfectly.
    C:\>pp --lib=c:\strawberry\perl\vendor\lib\XML -M XML::LibXML -M XML:: +LibXSLT -o test.exe test.pl
    I tried this but still the exe fails with the same error message.