I've been making an experimental webpage via nginx perl modules (not CGI!), and while I've been successfull on presenting the input page to the client (a main input field, some side fields, the send/reset buttons), I had ran into some problems with reciving the data.
Let's imagine a hypothetical scenario: a user fills in the tables and sends a POST request to the server, with the request headers containing a "content-type" field (which sould be "multipart/form-data" and the data, which should have been formated as per standarts and contain the stuff (text, image, other) that the user had put in the tables. The server, upon reciving the request, does actions as dictated by the code, with one of them being to prosess (use) data contained with the request.
In order to properly use the data, you have to extract it, and to do so, you use a parser. However, the multipart content type specification is too large to make a parser that will parse the input properly all by myself in a short time.
I have set my eyes upon MIME::Parser, however I haven't been able to find documentation that I could understand (or apply), nor could I find other people asking the same (or close) questions (And when I can find them, the answer usually involves CGI, which I've decided to not use from the begining of the project).
Am I missing something, or had I overlooked a more simple solution?
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.