CGI::StringDB Embedding perl data structures in an HTML post.

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


Wondering if anybody has already done something similar. I expect yes.

I wrote a module that has functions for ecoding and decoding Storable
structures into base32 and then encapping that into a CGI post.

The end result is basically 2 functions:

$string = hash2cgi($object) ;
print $string ;

# converts a Perl object to a html form, which can be cut and
# pasted into a document.

$object = cgi2hash() ;

# Extract the object into the local CGI script.

Essentially you should be able to pass around small databases this way
with very little HTML and no messing around with Mysql. It is just perl
talking to perl. I haven't really looked at the endian issue. It could
be a problem still, but it seems to work so far. I

I have currently named it CGI::StringDB. If anybody thinks something
like this might be cool to mess around with, post.  I haven't
documented it yet, but will try in get to it soon if anybody is
Interested in helping me test it out.


Site Timeline