OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 06-Jul-2006 14:34:41
Branch: HEAD Handle: 2006070613344100
Modified files:
openpkg-src/perl-www perl-www.patch perl-www.spec
Log:
Make over CGI::Gurumeditation
Summary:
Revision Changes Path
1.15 +208 -0 openpkg-src/perl-www/perl-www.patch
1.300 +1 -1 openpkg-src/perl-www/perl-www.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/perl-www/perl-www.patch
============================================================================
$ cvs diff -u -r1.14 -r1.15 perl-www.patch
--- openpkg-src/perl-www/perl-www.patch 8 Apr 2006 18:04:09 -0000
1.14
+++ openpkg-src/perl-www/perl-www.patch 6 Jul 2006 12:34:41 -0000
1.15
@@ -22,3 +22,211 @@
if (!$path || $path eq '.')
{
+
+Make over CGI::Gurumeditation <thl>
+ o send proper HTTP status header and content type
+ o make extensive attempts to expire immediately and get rid of cached data
in browser and proxies
+ o visually come closer to Amiga in terms of color, border width, font and
text
+ o http://en.wikipedia.org/wiki/Image:Guru_meditation.gif
+ o cleanup code replacing endless concats/escapes with qq{}
+
+Index: CGI-GuruMeditation-0.05/GuruMeditation.pm
+--- CGI-GuruMeditation-0.05/GuruMeditation.pm.orig Tue Feb 22 21:04:08 2005
++++ CGI-GuruMeditation-0.05/GuruMeditation.pm Thu Jul 6 13:33:39 2006
+@@ -54,9 +54,15 @@
+ }
+
+ # determine title
+- my $title = ( defined($CGI::GuruMeditation::name)
+- ? $CGI::GuruMeditation::name . ": "
+- : "") . "GURU MEDITATION";
++ my @t;
++ @t = gmtime(time);
++ my $title;
++ $title = "<p>Software Failure. " .
++ ( defined($CGI::GuruMeditation::name)
++ ? &escape_html($CGI::GuruMeditation::name)
++ : "Press reload button to continue."
++ ) . "\n<p>" .
++ sprintf "Guru Meditation
#%04d%02d%02d.%02d%02d%02d%02x\n", @t[5]+1900, @t[4]+1, @t[3,2,1,0], $$ & 255;
+
+ # properly escape characters for HTML inclusion
+ sub escape_html {
+@@ -71,91 +77,95 @@
+ $txt =~ s/([^\n])$/$1\n/s;
+ return $txt;
+ }
+- $title = &escape_html($title);
+ $hint = &escape_html($hint);
+ $msg = &escape_html($msg);
+- $msg =~ s/(\n.)/<br>$1/sg;
+-
+- # generate HTTP response header
+- my $O = "Content-Type: text/html; charset=ISO-8859-1\n\n";
++ $msg = "<pre>$msg</pre>";
+
++ # generate HTTP page header
++ my $O = "";
++ $O .= "HTTP/1.0 500 Internal Server Error\n";
++ $O .= "Content-Type: text/html; charset=ISO-8859-1\n";
++ $O .= "Expires: 0\n";
++ $O .= "Cache-Control: no-cache\n"; # browser
++ $O .= "Pragma: no-cache\n"; # proxy
++
+ # generate HTML page header
+- $O .=
+- "<html>\n" .
+- " <head>\n" .
+- " <style type=\"text/css\">\n" .
+- " HTML {\n" .
+- " width: 100%;\n" .
+- " height: auto;\n" .
+- " }\n" .
+- " BODY {\n" .
+- " background: #cccccc;\n" .
+- " margin: 0 0 0 0;\n" .
+- " padding: 0 0 0 0;\n" .
+- " }\n" .
+- " DIV.canvas {\n" .
+- " background: #000000;\n" .
+- " border: 20px solid #000000;\n" .
+- " }\n" .
+- " DIV.error1 {\n" .
+- " border-top: 4px solid #cc3333;\n" .
+- " border-left: 4px solid #cc3333;\n" .
+- " border-right: 4px solid #cc3333;\n" .
+- " border-bottom: 4px solid #cc3333;\n" .
+- " padding: 10px 10px 10px 10px;\n" .
+- " font-family: sans-serif, helvetica,
arial;\n" .
+- " background: #000000;\n" .
+- " color: #cc3333;\n" .
+- " }\n" .
+- " DIV.error2 {\n" .
+- " border-top: 4px solid #000000;\n" .
+- " border-left: 4px solid #000000;\n" .
+- " border-right: 4px solid #000000;\n" .
+- " border-bottom: 4px solid #000000;\n" .
+- " padding: 10px 10px 10px 10px;\n" .
+- " font-family: sans-serif, helvetica,
arial;\n" .
+- " background: #000000;\n" .
+- " color: #cc3333;\n" .
+- " }\n" .
+- " SPAN.title {\n" .
+- " font-size: 200%;\n" .
+- " font-weight: bold;\n" .
+- " }\n" .
+- " TT.text {\n" .
+- " font-weight: bold;\n" .
+- " }\n" .
+- " </style>\n" .
+- " <script language=\"JavaScript\">\n" .
+- " var count = 0;\n" .
+- " function blinker() {\n" .
+- " var obj = document.getElementById('error');\n" .
+- " if (count++ % 2 == 0) {\n" .
+- " obj.className = 'error1';\n" .
+- " }\n" .
+- " else {\n" .
+- " obj.className = 'error2';\n" .
+- " }\n" .
+- " setTimeout('blinker()', 1000);\n" .
+- " }\n" .
+- " </script>\n" .
+- " <title>$title</title>\n" .
+- " </head>\n";
+-
+- # generate HTML page body
+- $O .=
+- " <body onLoad=\"setTimeout('blinker()', 1);\">\n" .
+- " <div class=\"canvas\">\n" .
+- " <div id=\"error\" class=\"error1\">\n" .
+- " <span class=\"title\">$title</span>\n" .
+- " <p>\n" .
+- " <tt class=\"text\">\n" .
+- " $msg" .
+- " </tt><br>\n" .
+- " <pre>\n$hint</pre>\n" .
+- " </div>\n" .
+- " </div>\n" .
+- " </body>\n" .
+- "</html>\n";
++ $O .= qq {
++ <html>
++ <head>
++ <style type="text/css">
++ HTML {
++ width: 100%;
++ height: auto;
++ }
++ BODY {
++ background: #cccccc;
++ margin: 0 0 0 0;
++ padding: 0 0 0 0;
++ }
++ DIV.canvas {
++ background: #000000;
++ border: 20px solid #000000;
++ }
++ DIV.error1 {
++ border-top: 6px solid #ff0000;
++ border-left: 6px solid #ff0000;
++ border-right: 6px solid #ff0000;
++ border-bottom: 6px solid #ff0000;
++ padding: 10px 10px 10px 10px;
++ font-family: monospace;
++ background: #000000;
++ color: #ff0000;
++ }
++ DIV.error2 {
++ border-top: 6px solid #000000;
++ border-left: 6px solid #000000;
++ border-right: 6px solid #000000;
++ border-bottom: 6px solid #000000;
++ padding: 10px 10px 10px 10px;
++ font-family: monospace;
++ background: #000000;
++ color: #ff0000;
++ }
++ SPAN.title {
++ font-size: 150%;
++ font-weight: bold;
++ text-align: center;
++ }
++ TT.text {
++ font-weight: bold;
++ }
++ </style>
++ <script language="JavaScript">
++ var count = 0;
++ function blinker() {
++ var obj = document.getElementById('error');
++ if (count++ % 2 == 0) {
++ obj.className = 'error1';
++ }
++ else {
++ obj.className = 'error2';
++ }
++ setTimeout('blinker()', 680);
++ }
++ </script>
++ <title>Guru Meditation</title>
++ </head>
++ <body onLoad="setTimeout('blinker()', 1);">
++ <div class="canvas">
++ <div id="error" class="error1">
++ <span class="title">$title</span>
++ <p>
++ <tt class="text">
++ $msg
++ </tt><br>
++ <pre>$hint</pre>
++ </div>
++ </div>
++ </body>
++ </html>
++ };
++ $O =~ s/^[ ]{12}//gm;
+
+ # send response and die gracefully
+ $|++;
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/perl-www/perl-www.spec
============================================================================
$ cvs diff -u -r1.299 -r1.300 perl-www.spec
--- openpkg-src/perl-www/perl-www.spec 2 Jul 2006 14:39:58 -0000
1.299
+++ openpkg-src/perl-www/perl-www.spec 6 Jul 2006 12:34:41 -0000
1.300
@@ -95,7 +95,7 @@
Group: Language
License: GPL/Artistic
Version: %{V_perl}
-Release: 20060702
+Release: 20060706
# list of sources
Source0: http://www.cpan.org/modules/by-module/URI/URI-%{V_uri}.tar.gz
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]