The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Perl::Squish - Reduce Perl code to a few characters as possible


Perl source code can often be quite large, with copious amounts of comments, inline POD documentation, and inline tests and other padding.

The actual code can represent as little as 10-20% of the content of well-written modules.

In situations where the Perl files need to be included, but do not need to be readable, this module will "squish" them. That is, it will strip out as many characters as it can from the source, while leaving the function of the code identical to the original.


Perl::Squish is a fully PPI::Transform-compatible class. See that module's documentation for more information.


To keep things simple for the talk, I really don't get into some of the more in depth stuff that could make things even smaller.


Bugs should always be submitted via the CPAN bug tracker, located at

For general comments, contact the author.


Adam Kennedy <>




Copyright 2005 - 2009 Adam Kennedy.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.