PERLSTRIP(1)
π PERLSTRIP β bestie edition π
ok so like, this is perlstrip, and it lives in the User Contributed Perl Documentation section of your man pages (iykyk). it's a lil glow-up tool for your perl sources β we're making files smaller by yeeting comments, pod, whitespace... the whole "clutter era" basically. π
β¨ NAME β¨
perlstrip β make perl sources smaller by removing comments, pod, whitespace...
no cap, that's the whole personality. β¨
π¦ SYNOPSIS π¦
perlstrip file...
perlstrip --size --cache file...
-v verbose
--size optimise for size (also: -s)
--cache use a cache (also: -c)
--cache-dir path cache directory to use
--output path output file for next input file (also: -o)
WARNING: like its counterpartstrip, by default files are overwritten! π¨ bestie please read that twice. your originals are gone unless you pass-o. not me crying over your lost source. π
π DESCRIPTION π
this program reduces the filesize of perl sources. like, whenever you need it β for example, before bundling them using PAR, App::Staticperl, or when you're in a situation where disk space is premium (such as within firmwares, boot floppies etc.). tiny disk, big dreams. π§
how does it do it? by removing unnecessary whitespace, commands, POD and a few other things. slay, honestly. β¨
by default it works through the list of files given on the commandline, strips them and writes them again. the way that it just... rewrites your files in place. π this behaviour can be influenced via switches, thank god.
πΈ OPTIONS πΈ
--verbose,-vβ increases verbosity. highly recommended for interactive use, fr fr β you want to see what's happening. π--outputpath,-opath β write the stripped contents of the following files on the commandline to this path, instead of overwriting the original file. iconic behaviour, honestly. this can be used to copy files instead of (destructively) overwriting them, by specifying-obefore each file, e.g.:
perlstrip -o strippedfile origsource
--size,-sβ optimise for size instead of for compressibility. the default is to optimise the file for later compression. optimising for size makes the raw file size smaller, but might compress a bit worse. so like, pick your fighter. π--cache,-cβ stripping files can take a very long time. when this option is enabled,perlstripwill cache larger files in a special directory (default:~/.cache/perlstrip), to improve repeated calls to strip sources. honestly? main character energy for repeated work. π this is mainly useful when you strip a whole perl installation repeatedly.--cache-dirpath β enables caching, but uses an alternative cache directory (which will be created if it doesn't exist yet). cute, custom, and it makes the folder for you. π«Ά
π₯ SEE ALSO π₯
App::Staticperl, Perl::Squish. go read those too, bestie, they're the extended universe. β
π AUTHOR π
Marc Lehmann <schmorp@schmorp.de>
http://software.schmorp.de/pkg/staticperl.html
give the man his flowers, he wrote the whole thing. πΈ
okay that's the page!! and for the lil sign-off: this beauty is from perl v5.42.3, dated 2023-08-03, and it's filed under PERLSTRIP(1) β so if you need to find it again, that's your vibe check reference. periodt. π
β¨π
π¦ where this page comes from
- nixos 26.05: perl5.42.3-Perl-Strip 1.2
- nixpkgs unstable: perl5.42.3-Perl-Strip 1.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms