HTML-Embperl

 view release on metacpan or  search on metacpan

Changes.pod  view on Meta::CPAN

    - Error messages will also be cached, so that the compiling of the code
      only takes place once, because erroneous Perl code will cause memory
      leaks in Perl itself if it's compiled on and on and on.
    - Optimized the compiling of the embedded Perl code
    - Changed use Apache::Constants to conform with the new default exports
      introduced in mod_perl-1.07_01
    - Output of the 'hidden' metacommand is sorted in the same order as the input
      from the formfields (sorting order can also be supplied as third argument)
    - <meta http-equiv= ... > will override the corresponding http header
      (this keeps netscape from asking the user to reload the document
      when the content-type differs between the http header and the
      meta http-equiv)
      This can also be used to set http headers
      
    - Fixed a problem that Embperl magic variables do not work when
      the package exists before the first call to Embperl
    - Fixed a problem that caused a SIGSEGV when retrieving the same document
      containing a Perl error for the second time from the same child
    - Fixed a problem that caused Embperl to terminate in offline/cgi-mode
      when the file was not found or when access was forbidden
    - Fixed a problem with the 'hidden' metacommand, which came up when 

Embperl.pod  view on Meta::CPAN


=item B<TEXTAREA>, B</TEXTAREA>

The C<TEXTAREA> tag is treated exactly like other input fields.


=item B<META HTTP-EQUIV=>

<meta http-equiv= ... > will over-ride the corresponding http header.
This keeps Netscape from asking the user to reload the document
when the content-type differs between the http header and the
meta http-equiv.

This can also be used to set http headers. When running under mod_perl
http-headers can also be set by the function B<header_out>

    Example of how to set a http header:

    <META HTTP-EQUIV="Language" CONTENT="DE">

    This is the same as using the Apache function

Faq.pod  view on Meta::CPAN

=head2 My HTML tags like '<' '>' and '"' are being translated to &lt;, &gt; !!!

Hey! Not you again!? I thought we already sent you to the 
L<"Escaping & Unescaping"> section of the FAQ?!?! ;)


=head2 Netscape asks to reload the document

If you have something like this in your source, it may be the problem:

    <META HTTP-EQUIV="content-type" CONTENT="text/html;charset=iso-8859-1">

Netscape seems to have a problem in such cases, because the http header is
only content-type text/html, while the META HTTP-EQUIV has an additional
charset specified. If you turn optEarlyHttpHeader off, Embperl will
automatically set the http header to be the same as the META HTTP-EQUIV.


=head2 I get "Stack underflow"

The problem often occurs, when you have a <table> tag in one file and a </table>
tag in another file and you both include them in a main page (e.g. as header
and footer). There are two workarounds for this problem:

epmain.c  view on Meta::CPAN

		while ((pEntry = hv_iternext (r -> pHeaderHash)))
		    {
		    pKey     = hv_iterkey (pEntry, &l) ;
		    pHeader  = hv_iterval (r -> pHeaderHash, pEntry) ;
 		    loc = 0;
		    if (pHeader && pKey)
			{			    

			if (stricmp (pKey, "location") == 0)
			    loc = 1;
 			if (stricmp (pKey, "content-type") == 0)  
 			    {
 			    p = NULL;
 			    if ( SvROK(pHeader) && SvTYPE(SvRV(pHeader)) == SVt_PVAV ) 
 				{
 				arr = (AV *)SvRV(pHeader);
 				if (av_len(arr) >= 0) 
 				    {
 				    svp = av_fetch(arr, 0, 0);
				    p = SvPV(*svp, ldummy);
			    	    }

epmain.c  view on Meta::CPAN

				    oputs (r, ": ") ;
				    oputs (r, p) ;
				    oputs (r, "\n") ;
				    if (r -> bDebug & dbgHeadersIn)
                			lprintf (r,  "[%d]HDR:  %s: %s\n", r -> nPid, pKey, p) ; 
				    }
 				} 
			    else
				{				    
				p = SvPV (pHeader, na) ;
				if (stricmp (pKey, "content-type") == 0)
				    pContentType = p ;
				else
				    {
				    oputs (r, pKey) ;
				    oputs (r, ": ") ;
				    oputs (r, p) ;
				    oputs (r, "\n") ;
				    }
				if (r -> bDebug & dbgHeadersIn)
                		    lprintf (r,  "[%d]HDR:  %s: %s\n", r -> nPid, pKey, p) ; 



( run in 3.206 seconds using v1.01-cache-2.11-cpan-524268b4103 )