develooper Front page | perl.perl5.porters | Postings from November 2003

[perl #24488] undocumented incompatibility for CGI.pm

From:
Ulrich Windl
Date:
November 13, 2003 19:54
Subject:
[perl #24488] undocumented incompatibility for CGI.pm
Message ID:
rt-24488-67432.9.11408538496822@rt.perl.org
# New Ticket Created by  "Ulrich Windl" 
# Please include the string:  [perl #24488]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24488 >


This is a bug report for perl from feedback@suse.de,
generated with the help of perlbug 1.34 running under perl v5.8.1.


-----------------------------------------------------------------
[Please enter your report here]
Compared to Perl 5.8.0, 5.8.1 uses a CGI module that produces different
XHTML for unchanged code:
Perl code like
    print $q->start_html('-title' => TITLE, '-author' => AUTHOR,
                         '-style' => STYLESHEET);

produces this code for 5.8.1:
<style type="text/css">
<!--/* <![CDATA[ */
...
/* ]]> */-->
</style>

However for 5.8.1 the following code is produced:
<link rel="stylesheet" type="text/css" href=".help {font-size: 0.9em; font-
family: sans-serif}
...
.p-l {}" />

That is, the stylesheet is inserted literally as "href" attribute.

The older documentation (CGI) reads:

       sheets (css).  To incorporate a stylesheet into your docuĀ­
       ment, pass the start_html() method a -style parameter.
       The value of this parameter may be a scalar, in which case
       it is incorporated directly into a <style> section, or it
       may be a hash reference.  In the latter case you should
       provide the hash with one or more of -src or -code.  -src

The newer documentation reads:

       sheets (css).  To incorporate a stylesheet into your docuĀ­
       ment, pass the start_html() method a -style parameter.
       The value of this parameter may be a scalar, in which case
       it is incorporated directly into a <style> section, or it
       may be a hash reference.  In the latter case you should

The proper workaround is to use a hash reference with '-code' referring to
the actual stylesheet data.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=library
    severity=medium
---
This perlbug was built using Perl v5.8.1 - Tue Sep 23 15:40:04 UTC 2003
It is being executed now by  Perl v5.8.1 - Tue Sep 23 15:26:05 UTC 2003.

Site configuration information for perl v5.8.1:

Configured by root at Tue Sep 23 15:26:05 UTC 2003.

Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
  Platform:
    osname=linux, osvers=2.6.0-test3, archname=i586-linux-thread-multi
    uname='linux oldwotan 2.6.0-test3 #1 smp tue may 20 08:20:31 utc 2003
i686 i686 i386 gnulinux '
    config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl
-Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Duseshrplib=true -Doptimize=-
O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -pipe'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-
strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -pipe',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-
aliasing'
    ccversion='', gccversion='3.3.1 (SuSE Linux)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =''
    libpth=/lib /usr/lib /usr/local/lib
    libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.3.2'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-
rpath,/usr/lib/perl5/5.8.1/i586-linux-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared'

Locally applied patches:
    RC5

---
@INC for perl v5.8.1:
    /usr/lib/perl5/5.8.1/i586-linux-thread-multi
    /usr/lib/perl5/5.8.1
    /usr/lib/perl5/site_perl/5.8.1/i586-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.1
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.1
    /usr/lib/perl5/vendor_perl
    .

---
Environment for perl v5.8.1:
    HOME=/root
    LANG (unset)
    LANGUAGE (unset)
    LC_CTYPE=de_DE@euro
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)

PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X
11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About