install fatpacked carton in vendor/bin Fix #109 · 3928a83 · miyagawa/carton
Link: install fatpacked carton in vendor/bin Fix #109 · 3928a83 · miyagawa/carton
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.