[jifty-devel] in-component syntax
Eric Wilhelm
scratchcomputing at gmail.com
Sat May 6 17:02:46 EDT 2006
Hi all,
I've been trying to find a way to whittle-down the
<% Jifty->web->form->start() %>
<% Jifty->web->form->next_page( url => '/') %>
<% $action->form_field('title') %>
<% $action->form_field('body') %>
<% Jifty->web->form->submit( label => 'Post' ) %>
<% Jifty->web->form->end() %>
To something more like:
<% form->start() %>
<% form->next_page( url => '/') %>
<% $action->form_field('title') %>
<% $action->form_field('body') %>
<% form->submit( label => 'Post' ) %>
<% form->end() %>
form is a sub in the component namespace, not a package. See:
http://scratchcomputing.com/tmp/component_shortcuts.patch
There is the question of whether it should be "form" or "$form". This
is partly just a syntax thing, but if Jifty->web->form needs to do
anything besides return a singleton at some point (two form objects
kicking-around in one process?) then we would have to go with the
bareword.
--Eric
--
"...the bourgeoisie were hated from both ends: by the proles, because
they had all the money, and by the intelligentsia, because of their
tendency to spend it on lawn ornaments."
--Neal Stephenson
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
More information about the jifty-devel
mailing list