There's certainly a lot of use for this. Perl isn't just used for shell oneliners and quick 10 line munger scripts. mod_perl handlers, daemons written in Perl, and stuff like logfile or DNA sequence mungers that process hundreds of megabytes of input at every invocation will certainly benefit.
Even without those examples, I like the discipline imposed by assertions. They could be called "executable comments" - the important part being the promise that behaviour will not change at all with assertions disabled. It's like a test suite embedded right in the code.
Makeshifts last the longest.
|