[Catalyst] Simple literal Model

John M. Dlugosz wxju46gefd at snkmail.com
Fri Feb 25 01:56:27 GMT 2011

I'm planning several web pages that will be the same except for the actual content.  
Rather than code the details in the TT template or prepare a list literally in the Controller, I'm thinking that this ought to go into a Model.

But, it can just be a Perl declaration.  Something like:
  my @data= (
     { foo=>'bar', items=>[qw/first second third/], bar=>'baz },
     # 7 more rows

and add to that some subs to slice and dice the information so the TT doesn't have to; e.g. give a list of all the foo's.

How do I create a "static, literal" Model?
And, what would its form be in order to make it properly abstract, so it =could= be replaced with a standard DBIC or other model back-end without affecting the code?

More information about the Catalyst mailing list