metaperl has asked for the wisdom of the Perl Monks concerning the following question:
What I mean by region filter is something that takes a series of input lines but only returns those within a certain region.
If no such filter is written, I propose one with the following API:
region($a, $b) where $a and $b specify the start and end of the lines to return
example: Include a .pm file, but ignore the trailing pod:
[% INCLUDE source_code.pm | region('^package', '^1;') | indent %]
-- Terence Parr, "Enforcing Strict Model View Separation in Template Engines"
|
|---|