How can I create a portable strawberry with extra

2019-05-05 10:47发布

The portable strawberry perl is a godsend-- I can bundle it into an NSIS installer along with the actual scripts and have the user double click it. However, I'm still having to install CPAN modules that our scripts need, manually on each user's computer.

Is there a portable way to 'inject' cpan modules into strawberry perl's portable version?

Would it be a good idea to take the portable strawberry on a development machine, install modules via CPAN, and re-zip it for distribution? (I imagine I'd need to fix the install location to c:\custom-perl or something if I do this). Anyone know of a more direct way? I suppose I should script the cpan commands into the installer, but it would be nice if the user didn't have to wait 20 minutes+ for the installer (which is how long it takes to compile all dependencies).

1条回答
Ridiculous、
2楼-- · 2019-05-05 11:29

I think if you use one of the CPAN tools (cpan/cpanp/cpanm) it should install just fine to Z:\<strawberry path>\perl\site\lib and then you can pack the whole thing up.

查看更多
登录 后发表回答