JB> Uri Guttman wrote:
JB> Sometimes I agree with her regexp-less solutions.
JB> Oh, I agree, the most important thing to me is readability, and I try
JB> to improve that daily. Sadly I miss some of the Perl fun, but on the
JB> other hand I still am able to understand the scripts a month after I
JB> wrote them :-D
JB> Ah, well, I think it's not a bad idea that she shows that a reg exp is
JB> not always necessary, especially not for contains literal string
JB> checks.
you're missing the point. it does that all the time which is not
useful. sure you can do many string things without regexes, BFD. it is
almost always CLEARER with then than bypassing them. i have written
entire string libraries for PL/I so i know all the ways to mung strings
and i still prefer regexes in most cases. when you need to change stuff
and add parts to match etc, then bypassing regexes is a major pain. so
why put yourself into that position now? think about the life of the
code, who will read and maintain it down the road. make an informed
decision, not some kneejerk (and i use jerk for real here) like
moronzilla does. that is the point, it doesn't KNOW regexes nor like
them so it doesn't want to work with them. that is not someone to learn
from.
JB> But I agree that CGI.pm is a bit on the uhm huge size. (Also I am not
JB> happy with the XHTML output, but that's a different story). But in
JB> general, modules are a good thing, and often I can live with the
JB> CGI.pm overhead. If not, than I shouldn't have used CGI in the first
JB> place.
so what? how many dinky cgi setup need to be blazing fast? my last
project was analyzing a web based perl app which took 20 MILLION hits a
day. it was custom modified perl 5.6 guts with redone threading
internals and all sorts of specialize c code. no cgi.pm there. but it
was done because it needed to be blazing fast and scalable. but most
(and mean 90%) of web apps don't need that kind of speed and coding
simplicity is much more important than speed in most cases today. your
time is more valuable than the computer's.
JB> I read her now and then :-D.
i read just for laughs, pain or to catch shit so it gets corrected and
to make sure it doesn't snare newbies. the regulars or experienced ones
know to ignore it. it took a few month vacation (in the loony bin i
hope) and many new folks here never saw it before.
uri