> Guess you should pass a ref to $rendered to minify(), not the string
itself.
Yes!!! Thanks a lot! This did it. Here is the complete code for others:
use HTML::Packer;
use JavaScript::Packer;
use CSS::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,
do_javascript => 'best',
do_stylesheet => 'minify',
};
$html_packer->minify( \$rendered, $opts );
$c->response->body($rendered);
}
_______________________________________________
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/