[Catalyst] newbie yaml question

Eric W. Bates ericx at vineyard.net
Wed Jan 16 01:42:16 GMT 2008


Thanks

Ash Berlin wrote:
> 
> On Jan 15, 2008, at 11:39 PM, Eric W. Bates wrote:
> 
>> I'm a little vague on the use of YAML for the all the config options; 
>> but I have my Template Toolkit options in there:
>>
>> # TT config options
>> View::TT:
>>  CATALYST_VAR: c
>>  INCLUDE_PATH:
>>    - /usr/local/www/HG/root/src
>>    - /usr/local/www/HG/root/lib
>>  PRE_PROCESS: config/main.tt
>>  WRAPPER: site/wrapper.tt
>>  ERROR: errors/error_msg.tt
>>  TIMER: 0
>>  PRE_CHOMP: 1
>>  COMPILE_EXT: .ttc
>>  COMPILE_DIR: /var/spool/tt_compile
>>  FILTERS:
>>    bloom_sequence: \&HG::View::TT::format_bloom_sequence
>>
>> All of it works except for the FILTER definitions.  When I use the 
>> above, I get the error:
>>
>> filter error - invalid FILTER entry for 'bloom_sequence' (not a CODE ref)
>>
>> How do I specify a code ref in YAML?
> 
> You can't. Not really.
> 
>>
>>
>> If it's not possible can I use both the YAML and the traditional 
>> 'config()' method?  (I do question whether using 2 separate methods in 
>> 2 separate files to perform a single config is really transparent...)
> 
> Yes. having most of the config in the YAML, and just the filters 
> specified by __PACKAGE__->config should work fine.
> 
>>
>>
>> Thanks.
>>
> 
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
> 
> 



More information about the Catalyst mailing list