11 8 / 2013

It also fatpackes cpanm’s fatscript, and runs that by saving it to a temp file with Module::Reader from fatpack. Meta-Fatpacking!

because cpanm is installed as a fatpack executable, making Carton fatpack that calls cpanm (without requiring to have cpanm installed separately) is kind of tricky.

I solved this by installing App::cpanminus::fatscript, the same content as cpanm, in @INC, then fatpack it in Carton. Then Carton calls out either a) $INC{"App/cpanminus/fatscript.pm"} in the normal mode, or b) read the content of fatscript.pm with Module::Reader, then save it into a temp file and call it with $^X.

Meta fatpacking.