in reply to how ship perl in my application?

On Windows, you can simply copy the Perl executable and the surrounding files around. The only thing to patch is Config.pm if you care about other tools finding the correct directories.

Stripping modules from the Perl distribution is something I don't like, but if you want to do that, you'll have to then hunt down all the dependent module files and copy them along.

Replies are listed 'Best First'.
Re^2: how ship perl in my application?
by xiaoyafeng (Deacon) on May 11, 2012 at 08:47 UTC

    Thanks, Corion!

    I compiled a toy program embed in perl link with perl512.lib, and rename perl directory then copy perl512.dll in the same directory where program is, the program works fine.

    But the coming problem is how ship modules? I'd like put those in the specific directory instead of C:\perl





    I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

      I think the Perl interpreter will look in a sibling directory to the executable:

      C:\Programs\xiaoyafeng_perl\bin\xyf_p.exe C:\Programs\xiaoyafeng_perl\site\...

      ... but you can also in interpreter startup push directories onto @INC to make the Perl interpreter search there.

        Thanks again, Corin! Your reply does clear up my doubts. I'll test it right now ;)in coming weekend.




        I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

        Hi Anonymous Monk,

        I've downloaded the and this is a great tool. but IMHO, maybe it doesn't fit my requirement. I have a c program embed with perl, and works fine in my machine now. But I don't want user have to install a perl distribution for using this. Cava packager is a nice tool to package perl script into a executable as pp dose, but it might not fit this scenario. please point out if I'm wrong





        I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction