[27804] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 9168 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 17 21:06:06 2006

Date: Mon, 17 Apr 2006 18:05:07 -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           Mon, 17 Apr 2006     Volume: 10 Number: 9168

Today's topics:
    Re: RXParse module (by robic0), Version 0.1000 <matthew.garrish@sympatico.ca>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 17 Apr 2006 17:32:51 -0400
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: RXParse module (by robic0), Version 0.1000
Message-Id: <3QT0g.771$DR6.68058@news20.bellglobal.com>


"Uri Guttman" <uri@stemsystems.com> wrote in message 
news:x7r73weu0s.fsf@mail.sysarch.com...
>
> normally i avoid this troll and of course posting any code reviews of
> his crappy modules. but i am still drawn to skim its code for laughs and
> for future examples of how not to code in perl. and i came across this
> nugget:
>
>>>>>> "r" == robic0  <robic0> writes:
>
>
>  r> while ($$ref_parse_ln =~ /$RxParse/g)
>  r> {
>  r> ## handle contents
>  r> if (defined $14) {
>  r> $content .= $14;
>
> and MUCH MUCH later:
>
>  r> $RxParse =
>  r> 
> qr/(?:<(?:(?:(\/*)($Name)\s*(\/*))|(?:META(.*?))|(?:($Name)((?:\s+$Name\s*=\s*["'][^<]*['"])+)\s*(\/*))|(?:\?(.*?)\?)|(?:!(?:(?:DOCTYPE(.*?))|(?:\[CDATA\[(.*?)\]\])|(?:--(.*?[^-])--)|(?:ATTLIST(.*?))|(?:ENTITY(.*?)))))>)|(.+?)/s;
>
> yes, that is one long line of regex with at least 14 grabs. read it and
> weep. you may want to gouge out your eyes and i sympathize with you.
>
> the regex is assigned way away from where it is used (and it's a
> horrible regex to boot. does this moron really think he can parse SGML
> type stuff with a regex?). but the use of $14 is one of the worst pieces
> of perl code i have ever seen. and there is an amazing amount of bad
> perl out there (easy to find on the web and in too much of cpan). but i
> have never seen $14 used before. that takes a really microencephalic
> brain to use a numbered grab that large, with such an ugly regex and
> being so far away from the regex. but we know this troll well enough to
> know it can code this poorly and now we have proof.
>

We had this out with him just before you came back. Myself and a few other 
tried to explain to him that his xml regex parsing thing would never fly, 
and he actually acknowledged as much at one point after falling hopelessly 
on his face. It seems he's gone back to the 
this-is-my-parser-that-does-nothing-useful-anyone-would-want-and-doesn't-follow-xml-rules-and 
I-don't-care attitude:

http://tinyurl.com/p84zb

Matt 




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

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 9168
***************************************


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