in reply to Catalyst::VIew::TT - format an object
Why do you want to use TT Filter?
The way I would approach this problem would be to add some methods to your Bio::Seq class that return html to pretty print your sequence. That way your template just becomes:
The sequence is:[% bio_seq.seq_pretty_display %]This will have the effect of moving the pretty printing code into your class where it is easier to test, but breaks the strict MVC paradigm of keeping the View separate from the model and controller.
My answer to any pedant who raises that point, is that perl has always been about being pragmatic and getting things done, rather than blind adherence to a particular design pattern.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Catalyst::VIew::TT - format an object
by tospo (Hermit) on Jun 27, 2011 at 21:50 UTC |