[Catalyst] Catalyst::View::TT

Krzysztof Krzyżaniak eloy at pawnhearts.eu.org
Tue Nov 14 08:55:19 GMT 2006


Ivan Wills <ivanw at benon.com> writes:

> Krzysztof Krzyżaniak wrote:
>> Ash Berlin <ash at cpan.org> writes:
>>
>>
>>> Ivan Wills wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm using Catalyst::View::TT to display my pages. I'm having trouble
>>>> removing excess blank lines appearing at the top of my files.
>>>>
>>>> I realise this is not normally a problem but I am playing with mixing
>>>> SVG and XHTML (with content-type=text/xhtml) but Firefox considers the
>>>> extra blank lines to be an error when in XML rendering mode if they
>>>> appear before the <?xml ... ?> deceleration.
>>>>
>>>> Any one know how to remove those blank lines?
>>>>
>>> [% END -%]
>>>
>>> also known as RTFM ;)
>>>
>>
>> or options of template toolkit
>>
>>        PRE_CHOMP, POST_CHOMP
>>            Remove whitespace before/after directives (default: 0/0).
>>
>>   eloy
>>
> The PRE_CHOMP option looks like the options that I want but where do I
> apply those settings?

I use config file but it could be defined in View definition, for example

package AppName::View::TT;

use strict;
use base 'Catalyst::View::TT';

__PACKAGE__->config->{'PRE_CHOMP'} = 1;

1;

  eloy
-- 
-------e-l-o-y----------------------------e-l-o-y- at -k-o-f-e-i-n-a-.-n-e-t------

       jak to dobrze, że są oceany - bez nich byłoby jeszcze smutniej



More information about the Catalyst mailing list