[jifty-devel] state_variables handling in Jifty::Web

Sean E. Millichamp sean at enertronllc.com
Sun May 14 09:31:12 EDT 2006

On Sat, 2006-05-13 at 15:01 -0400, Sean E. Millichamp wrote:
> I have been trying (unsuccessfully) to do the following as a certain
> if/else case in an action's take_action method:
> Jifty->web->set_variable('foo', 'bar');

> I was looking in lib/Jifty/Web.pm and it seems to me that there is
> something odd going on with state_variables.  There seems to be a set
> that lives in Jifty->web->request and also a set that lives in
> Jifty->web->{'state_variables'}.

Okay, I think I figured it out.  I think it was a bug in Jifty.
Specifically, it looks like there was a transition at some point from
storing the state in Jifty->web->{'state_variables'} to storing it in
Jifty->web->request->state_variables and that a couple of places in
Jifty/Web.pm were never updated to use this new scheme.

I have committed changes which seem to be correct in SVN commit r1054.
In my testing I can now do from my Action:

and be able to do Jifty->web->get_variable('foo') in the Mason template
for /new/url to read foo.

I would still like someone more knowledgeable about Jifty to review that
commit and make sure it looks good though.


 Sean E. Millichamp, Enertron LLC, 586-757-1200 x102

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20060514/f9552acf/attachment.pgp

More information about the jifty-devel mailing list