[27778] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 9144 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 11 11:06:00 2006

Date: Tue, 11 Apr 2006 08:05:04 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 11 Apr 2006     Volume: 10 Number: 9144

Today's topics:
        CGI.pm annoying xHTML output <you.can@request.net>
    Re: CGI.pm annoying xHTML output <xx087@freenet.carleton.ca>
    Re: CGI.pm annoying xHTML output <you.can@request.net>
    Re: CGI.pm annoying xHTML output <null@no.spam>
    Re: CGI.pm annoying xHTML output <xx087@freenet.carleton.ca>
        Code Quality and examples from the Perl source code <dds@aueb.gr>
    Re: tr/// broken? <zbrg@mail.invalid>
    Re: XS progamming question <bol@adv.magwien.gv.at>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 11 Apr 2006 12:56:47 +0200
From: FrankB <you.can@request.net>
Subject: CGI.pm annoying xHTML output
Message-Id: <mn.5b087d648a5db7f5.52380@request.net>

Hello,

when creating a form with CGI.pm, no matter if it is
use CGI;
$q = new CGI qw /:all -debug/;
print header and start the html etc..

print $q->start_form; OR
print $q->start_multipart_form();
print $q->textfield('blah');
print $q->end_form;
#etc..

it *always* returns an obsolete trailing HTML "<div></div>" container
before the closing tag of the form.

Any ideas ? It seems not to be
a known issue.

(Perl 5.8.1 on linux)
--
FrankB




------------------------------

Date: 11 Apr 2006 14:32:55 GMT
From: Glenn Jackman <xx087@freenet.carleton.ca>
Subject: Re: CGI.pm annoying xHTML output
Message-Id: <slrne3nfgn.o2k.xx087@smeagol.ncf.ca>

At 2006-04-11 06:56AM, FrankB <you.can@request.net> wrote:
>  Hello,
>  
>  when creating a form with CGI.pm, no matter if it is
>  use CGI;
>  $q = new CGI qw /:all -debug/;

Those lines should read:
    use CGI qw/:all -debug/;
    my $q = new CGI;

>  print $q->end_form;
>  
>  it *always* returns an obsolete trailing HTML "<div></div>" container
>  before the closing tag of the form.

A browse through CGI.pm indicates it outputs that div container if
sticky is on, so do this:
    use CGI qw/:all -debug -nosticky/;
or call:
    CGI::nosticky(1);
before ending the form.

-- 
Glenn Jackman
Ulterior Designer


------------------------------

Date: Tue, 11 Apr 2006 16:40:04 +0200
From: FrankB <you.can@request.net>
Subject: Re: CGI.pm annoying xHTML output
Message-Id: <mn.5be87d64ba721211.52380@request.net>

Glenn Jackman formulated the question :
> At 2006-04-11 06:56AM, FrankB <you.can@request.net> wrote:
>>  Hello,
>>  
>>  when creating a form with CGI.pm, no matter if it is
>>  use CGI;
>>  $q = new CGI qw /:all -debug/;
>
> Those lines should read:
>     use CGI qw/:all -debug/;
>     my $q = new CGI;

Ok.
Is the lexical variable really mandatory ?

>>  print $q->end_form;
>>  
>>  it *always* returns an obsolete trailing HTML "<div></div>" container
>>  before the closing tag of the form.
>
> A browse through the CGI.pm indicates it outputs that div container if
> sticky is on, so do this:
>     use CGI qw/:all -debug -nostick/;
> or call:
>     CGI::nosticky(1);
> before ending the form.

Thanks, and I indeed didn't think about checking the module itself..
(smashes forehead)

--
FrankB




------------------------------

Date: Tue, 11 Apr 2006 09:56:17 -0500
From: Todd <null@no.spam>
Subject: Re: CGI.pm annoying xHTML output
Message-Id: <e1gg2h$ks3$2@home.itg.ti.com>

FrankB wrote:
> Hello,
> 
> when creating a form with CGI.pm, no matter if it is
> use CGI;
> $q = new CGI qw /:all -debug/;
> print header and start the html etc..
> 
> print $q->start_form; OR
> print $q->start_multipart_form();
> print $q->textfield('blah');
> print $q->end_form;
> #etc..
> 
> it *always* returns an obsolete trailing HTML "<div></div>" container
> before the closing tag of the form.
> 
> Any ideas ? It seems not to be
> a known issue.
> 
> (Perl 5.8.1 on linux)
> -- 
> FrankB
> 
> 
Are you using the latest version of CGI?  That problem went away when I 
installed 3.15.

Todd


------------------------------

Date: 11 Apr 2006 15:02:02 GMT
From: Glenn Jackman <xx087@freenet.carleton.ca>
Subject: Re: CGI.pm annoying xHTML output
Message-Id: <slrne3nh7a.o2k.xx087@smeagol.ncf.ca>

At 2006-04-11 10:40AM, FrankB <you.can@request.net> wrote:
>  Glenn Jackman formulated the question :
> >     use CGI qw/:all -debug/;
> >     my $q = new CGI;
>  
>  Ok.
>  Is the lexical variable really mandatory ?

If you're using 'use strict' (as you should be) it's a good idea.

-- 
Glenn Jackman
Ulterior Designer


------------------------------

Date: Tue, 11 Apr 2006 17:22:55 +0300
From: Diomidis Spinellis <dds@aueb.gr>
Subject: Code Quality and examples from the Perl source code
Message-Id: <e1ge40$9dp$4@volcano1.grnet.gr>

A quick note to inform my fellow Perl users and developers that my new 
book "Code Quality: The Open Source Perspective" (Addison-Wesley, 2006) 
has just been published.  All 623 examples I use in the book are drawn 
from actual code, and Perl (particularly its testing framework) is one 
of the packages I used for drawing examples.  Perl was also instrumental 
in automating the book's production process.  For more details you can 
visit the book's web site at <http://www.spinellis.gr/codequality?clpm>.

-- 
Diomidis Spinellis                      Associate Professor
Department of Management Science and Technology      (DMST)
Athens University of Economics and Business          (AUEB)
http://www.dmst.aueb.gr/dds/             mailto:dds@aueb.gr


------------------------------

Date: Tue, 11 Apr 2006 12:38:58 +0200
From: <zbrg@mail.invalid>
Subject: Re: tr/// broken?
Message-Id: <443b8741$0$5170$626a54ce@news.free.fr>

Ilya Zakharevich a dit le Tue, 11 Apr 2006 02:53:58 +0000 (UTC):
>I'm trying to use tr/// operator (instead of RExen), and do not think
>it works...  The simplified example is
>
>    >perl5.8.7 -wle "$_ = q(abcdefg); tr/\x{e000}-\x{e0ff}/ /c; print"
>    UTF-16 surrogate 0xdfff at -e line 1.
>    Malformed UTF-8 character (UTF-16 surrogate 0xdfff) at -e line 1.
>    abcdefg
>
[...]
>That spurious warning can be worked about, but I think the behaviour
>is not up to documentation; is it?

Its in the perldiag manpage :

        UTF-16 surrogate %s
(W utf8) You tried to generate half of an UTF-16 surrogate by requesting a  
Unicode character between the code points 0xD800 and 0xDFFF (inclusive).  That  
range is reserved exclusively for the use of UTF-16 encoding (by having two 16- 
bit UCS-2 characters); but Perl encodes its characters in UTF-8, so what you  
got is a very illegal character.  If you really know what you are doing you can  
turn off this warning by "no warnings 'utf8';". 



------------------------------

Date: Tue, 11 Apr 2006 14:15:07 +0200
From: "Ferry Bolhar" <bol@adv.magwien.gv.at>
Subject: Re: XS progamming question
Message-Id: <1144757709.228745@proxy.dienste.wien.at>

Ilya Zakharevich:

>   perl -wle "sub aa {print 12} BEGIN{ delete $main::{aa} } aa()"
>   Undefined subroutine &main::aa called at -e line 1.
>
> But make sure that the glob is removed BEFORE any call to these
> subroutines is compiled.

Why? What will happen else?

BTW: I got 2 links with informations concerning XS programming:

http://inline.perl.org

http://www.netthink.co.ok/downloads

However, both links seem to be broken: connecting to the first results
in a timeout, the second points me to the home page of a provider who
telled me the the owner of the netthink domain is not longer hosted by him.

Perhaps someone knows the right URLs?

MTIA and kind greetings from Vienna,

Ferry

-- 
Ing. Ferry Bolhar
Municipality of Vienna, Department 14
A-1010 Vienna / AUSTRIA
E-mail: bol@adv.magwien.gv.at





------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 9144
***************************************


home help back first fref pref prev next nref lref last post