Re: [Templates] Objects as hidden variables?

[prev] [thread] [next] [Date index for 2004/12/17]

From: Sean Kellogg
Subject: Re: [Templates] Objects as hidden variables?
Date: 19:36 on 17 Dec 2004
Good call...  I knew there was something out there that did serialization for 
objects, I just could remember what it was called.

-Sean

On Friday 17 December 2004 11:14 am, Larry Leszczynski wrote:
> Hi Jonathan -
>
> > > What you'll need to do is create a hidden field for EVERY member of
> > > the session object and then reassemble the object in the subsequent
> > > script:
> > >
> > > my $session = new Session;
> > > $session->{uid} = $q->param('uid');
>
> Depending on how big your session object is and what kind of stuff is in
> it, another thing you could try is to serialize the entire session into a
> string and use that as your hidden variable, and then unserialize when the
> form is submitted.  You could use something like the Storable module's
> freeze and thaw methods, or maybe the Data::Serializer module:
>
> http://search.cpan.org/~neely/Data-Serializer-0.28/lib/Data/Serializer.pm
>
> I haven't tried that one myself but it look interesting, it has options
> for which serializer gets used (including Storable) as well as optional
> encryption, compression, and ascii-armoring via hex or base64 (which
> you'd definitely want to make it safe to put in an HTML page).
>
>
> HTH,
> Larry Leszczynski
>
>
>
>
> _______________________________________________
> templates mailing list
> templates@xxxxxxxxxxxxxxxx.xxx
> http://lists.template-toolkit.org/mailman/listinfo/templates

        -- 
        Sean Kellogg
2nd Year - University of Washington School of Law
GPSS Senator - Student Bar Association
Editor-at-Large - National ACS Blog [http://www.acsblog.org]
c: 206.498.8207    e: skellogg@x.xxxxxxxxxx.xxx

So, let go
 ...Jump in
  ...Oh well, what you waiting for?
   ...it's all right
    ...'Cause there's beauty in the breakdown

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] Objects as hidden variables?
Jonathan Mangin 17:08 on 17 Dec 2004

Re: [Templates] Objects as hidden variables?
Sean Kellogg 17:16 on 17 Dec 2004

Re: [Templates] Objects as hidden variables?
Jonathan Mangin 17:32 on 17 Dec 2004

Re: [Templates] Objects as hidden variables?
Larry Leszczynski 19:14 on 17 Dec 2004

Re: [Templates] Objects as hidden variables?
Sean Kellogg 19:36 on 17 Dec 2004

Re: [Templates] Objects as hidden variables?
Jonathan Mangin 19:49 on 17 Dec 2004

Re: [Templates] Objects as hidden variables?
Trond Michelsen 00:42 on 18 Dec 2004

Re: [Templates] Objects as hidden variables?
merlyn (Randal L. Schwartz) 03:30 on 18 Dec 2004

RE: [Templates] Objects as hidden variables?
Simon Matthews 12:34 on 18 Dec 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52