CGI-Minimal

 view release on metacpan or  search on metacpan

lib/CGI/Minimal.pod  view on Meta::CPAN

Returns a copy of the raw form data. Returns 'undef' if the form
has not been parsed yet.

=back

=cut

=over 4

=item date_rfc1123($time);

Takes a unix time tick value and returns a RFC1123 compliant date
as a formatted text string suitable for direct use in Expires,
Last-Modified or other HTTP headers (with the exception of
'Set-Cookie', which requires a different format not generated
here. See 'CGI::Cookie' for cookie generation).

Example:

 print "Expires: ",$cgi->date_rfc1123(time + 3600),"\015\012";

=back

=cut

=over 4

=item calling_parms_table;

Returns a formatted HTML table containing all the form and environment
variables for debugging purposes

Example:

  print $cgi->calling_parms_table;

=back

=cut

=over 4

=item url_encode($string);

Returns URL encoding of input string (URL unsafe codes are
escaped to %xx form)

Example:

 my $url_encoded_string = $cgi->url_encode($string);

=back

=cut

=over 4

=item url_decode($string);

Returns URL *decoding* of input string (%xx and %uxxxx substitutions
are decoded to their actual values).

Example:

 my $url_decoded_string = $cgi->url_decode($string);

=back

=cut

=over 4

=item htmlize($string);

Returns HTML 'safe' encoding of input string. Replaces &,>,< and "
with their named entity codes (&amp, &gt; &lt; and &quot;)

Example:

 my $html_escaped_string = $cgi->htmlize($string);

=back

=cut

=over 4

=item dehtmlize($string);

Undoes basic HTML encoding of input string. Replaces &amp;,
&gt;, &lt; and &quot; named entity codes with their actual values.
NOT a general purpose entity decoder.

=back

=cut

=over 4

=item truncated;

Returns '1' if the read form was shorter than the
Content-Length that was specified by the submitting
user agent (ie the data from a form uploaded by a
web browser was cut off before all the data was received).

Returns '0' if the form was NOT truncated.

Example:

  use CGI::Minimal;

  my $cgi = CGI::Minimal->new;
  if ($cgi->truncated) {
    &bad_form_upload;
  } else {
    &good_form_upload;
  }

'truncated' will also return '1' if the form length
received would have exceeded the set 'max_read_length'.

=back

=cut



( run in 0.960 second using v1.01-cache-2.11-cpan-600a1bdf6e4 )