Skip to content

Commit

Permalink
-verbatim tag from Mike Dickson
Browse files Browse the repository at this point in the history
  • Loading branch information
lstein committed Dec 3, 2002
1 parent 7ec18f5 commit 217fd6d
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
19 changes: 18 additions & 1 deletion CGI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use Carp 'croak';
# The most recent version and complete docs are available at:
# http://stein.cshl.org/WWW/software/CGI/

$CGI::revision = '$Id: CGI.pm,v 1.81 2002-12-03 15:03:22 lstein Exp $';
$CGI::revision = '$Id: CGI.pm,v 1.82 2002-12-03 15:22:26 lstein Exp $';
$CGI::VERSION='2.90';

# HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES.
Expand Down Expand Up @@ -6326,6 +6326,23 @@ http://www.w3.org/pub/WWW/TR/Wd-css-1.html for more information.
Pass an array reference to B<-style> in order to incorporate multiple
stylesheets into your document.
Should you wish to incorporate a verbatim stylesheet that includes
arbitrary formatting in the header, you may pass a -verbatim tag to
the -style hash, as follows:
print $q->start_html (-STYLE => {-verbatim => '@import
url("/server-common/css/'.$cssFile.'");',
-src => '/server-common/css/core.css'});
</blockquote></pre>
This will generate an HTML header that contains this:
<link rel="stylesheet" type="text/css" href="/server-common/css/core.css">
<style type="text/css">
@import url("/server-common/css/main.css");
</style>
=head1 DEBUGGING
If you are running the script from the command line or in the perl
Expand Down
29 changes: 28 additions & 1 deletion cgi_docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3551,6 +3551,32 @@ <h2><a name="stylesheets">Limited Support for Cascading Style Sheets</a></h2>
multiple stylesheets into your document.

<p>

Should you wish to incorporate a verbatim stylesheet that includes
arbitrary formatting in the header, you may pass a -verbatim tag to
the -style hash, as follows:

<pre><blockquote>
print $q-&gt;start_html (-STYLE =&gt; {-verbatim =&gt; '@import
url("/server-common/css/'.$cssFile.'");',
-src =&gt; '/server-common/css/core.css'});
</blockquote></pre>

<p>

This will generate HTML like this:

<pre><blockquote>
&lt;link rel="stylesheet" type="text/css"
href="/server-common/css/core.css">

&lt;style type="text/css"&gt;
@import url("/server-common/css/main.css");
&lt;/style&gt;
</blockquote></pre>

<p>

<a href="#contents">Table of contents</a>

<hr>
Expand Down Expand Up @@ -4687,6 +4713,7 @@ <H2><a name="bugs">Bug Reports</a></H2>
<H2><A NAME="new">Revision History</A></H2>
<h3>Version 2.90</h3>
<ol>
<li>Added a -verbatim option to stylesheet generation from Michael Dickson
<li>Faster delete() method from Neelam Gupta
<li>Fixed broken Cygwin support.
<li>Added empty charset support from Bradley Baetz
Expand Down Expand Up @@ -5701,6 +5728,6 @@ <H3>Bug fixes</H3>
<a href="http://www.cshl.org/">Cold Spring Harbor Laboratory</a></ADDRESS>
<P>
<!-- hhmts start -->
Last modified: Tue Dec 3 10:03:05 EST 2002
Last modified: Tue Dec 3 10:22:19 EST 2002
<!-- hhmts end -->
</BODY> </HTML>

0 comments on commit 217fd6d

Please sign in to comment.