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



Howdy,

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.

-Thanks
-Matt

.



Relevant Pages

  • RE: question
    ... Is perl right for the ... # this import's the param and header functions from the CGI ... # module which is a core module so you'll have it installed. ... handle your html form input with param. ...
    (perl.beginners)
  • Re: Form values in HTML not retaining.
    ... HTML form and some HTML fields(like check boxes). ... It is a perl or cgi question. ...
    (comp.lang.php)
  • Re: Complex extensions in C
    ... of this structure are pointers to type double arrays. ... On the perl side ... method is to use packto build the struct in a string. ... perl object, extracts it's attributes and passes ...
    (comp.lang.perl.misc)
  • RE: Totally lost - need a starting point
    ... I am starting from scratch again reading the manual more ... I am just running out of time on my deadline. ... script from a perl program. ... form values from an HTML form. ...
    (perl.beginners)
  • Re: how can I retrieve a file sent from an HTML form?
    ... > But if the following HTML form is submitted to my Perl script... ... The way the documentation of the library you are using tells you to. ...
    (comp.lang.perl.misc)