in reply to Re: Passing a reference as the value of a hidden html field
in thread Passing a reference as the value of a hidden html field

I'm not proposing to allow my clients to see my memory addresses, it's a purely internal thing. I think I'm just stupid for not deciding to just use a unique ID on each row of data =)

Interesting that under mod_perl it's persistant and the memory addresses stay. Seems like it would be a poor idea to write scripts to depend on that, though, no? What if someone tries to run your script on a non mod_perl/non persistent environment?

Thanks!
LassiLantar
  • Comment on Re^2: Passing a reference as the value of a hidden html field

Replies are listed 'Best First'.
Re^3: Passing a reference as the value of a hidden html field
by chromatic (Archbishop) on Jul 20, 2004 at 22:07 UTC

    Even under mod_perl, there are probably multiple server kids serving requests, so there's little guarantee you'll reach the same process as before. You're right that you shouldn't rely on this... but fortunately, it's really hard (but not impossible) to turn a stringified reference back into a real reference.

    There are times in which a similar technique works, though. Continuations can work really well for web programming, though Perl 5 doesn't really support them natively. You'll probably be sorry for asking what they are unless you've used Scheme.

Re^3: Passing a reference as the value of a hidden html field
by ccn (Vicar) on Jul 20, 2004 at 21:37 UTC
    I'm not proposing to allow my clients to see my memory addresses, it's a purely internal thing.

    But if you use these addresses in hidden fields of html form than everyone can see them in a html source and send back fake addresses. It's a big hole

      Oh... right.

      *Walks away bashful*

      Peace,
      LL