[Catalyst] generic db table list
Fernan Aguero
fernan at iib.unsam.edu.ar
Fri Jun 2 15:25:04 CEST 2006
+----[ Zbigniew Lukasiak <zzbbyy at gmail.com> (02.Jun.2006 04:34):
|
[ snipped ]
| >All the examples in the Template Toolkit pods always use the
| >exact names of the keys for accessing values ... and I find
| >it difficult to follow the InstantCRUD example as the 'list'
| >action (InstantCRUD.pm, line 211) does not define any
| >'columns' in the stash, but they are used in the associated
| >'list.tt' template (where does this array come from?)
| >
| >For those familiar with InstantCRUD, there are some column
| >names begin pushed into the stash in another action (auto)
| >... but I cannot see how they're connected.
[ and now reversing a top post reply ]
| Hi,
Hi!
| The auto action is called before any other action from that controller
| - so the $c->stash->{columns} just stays there and is always available
| in the View.
That makes the connection ... I see it now :)
| 'perldoc Catalyst' says:
| ...
| # called for all actions, from the top-most controller downwards
| sub auto : Private {
| ...
yes of course, it's in the SYNOPSIS, right before anything
else!
the problem is that, being new to catalyst, the synopsis
didn't make sense to me on a first read ... so I just
skipped it and went down for the more descriptive text and
the tutorial ... seems like I have to go back and re-read
the pods :)
| --
| Zbigniew Lukasiak
|
+----]
Thanks for the clarification, and thanks for sharing
InstantCRUD! Not only it makes for a good example, but it's
only a good way to bootstrap a DBIx::Class schema without
writing all the Table.pm modules yourself!
Fernan
More information about the Catalyst
mailing list