Thanks Brian for the HTML::Packer link:
https://metacpan.org/module/HTML::Packer
I've now tested to implement the packer for each template parsing by
modifying the process function in my Catalyst::View::TT
(lib/MyApp/View/HTML.pm):
use HTML::Packer;
my $html_packer = HTML::Packer->init();
sub process {
my ( $self, $c ) = @_;
my $rendered = $self->render($c, $c->stash->{template});
my $opts = {
remove_comments => 1,
remove_newlines => 1,
html5 => 1,
};
$html_packer->minify( $rendered, $opts );
$c->log->debug("Packed: " . $rendered);
$c->response->body($rendered);
}
But it seems that the html_packer has no effect, the debug output isn't
compressed.
Did I something wrong? Is the $opts hashref correct?
Thanks
Stefan
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/