Re: Bareword errors?
- From: krakle@xxxxxxxxx
- Date: 3 Dec 2006 09:55:17 -0800
On Nov 28, 6:23 pm, gcr <reviewyourd...@xxxxxxxxxxx> wrote:
There were also
big back and forths on the newsgroup by those more knowledgable than I
(that would be everyone) about the pluses and minuses of cgi.pm. I
haven't been burned *yet* by using the regexes and it's been in pretty
constant use for a while. I like to be able to control what is being
decoded for various reasons which I wasn't able to figure out in cgi.pm.
I've also fixed other peoples broken cgi's (again, linebreak issues) by
taking cgi.pm out and using regexes. YMMV.
What makes Perl so great is CPAN and all the available reliable
well-mantained quality modules.
Countless programmers have spent hours writing and mantaining module
code so we can have the capabilities to perform certain operations
trouble and stress free. This saves us from unneccessary development
time and headachs. You wouldn't spend hours and hours trying to
reinvent the wheel when the wheel is right infront of you ready to be
used.
What you have is a piece of code that dumps all parameters into Global
variables regardless of size. This will be stored in memory during the
duration of run time. Your sub form parsing technique is dated and
though may get the job done it also does ZERO error and safety handling
which makes it open to all sorts of future and present catastrophes.
You claim you want full control over how the form data is processed yet
you use it in the most generic way which makes your statement reflect
your inexperience even more so. If you have several CGIs and each use
the same copied sub-routine you are actually limiting functionality and
mantainability. Eventually you'd end up dumping the code in a module.
Then you will soon or later be forced into spending hours trying to
make your code more strict and bug free. Which would be reinventing the
wheel.
Modules are created for a reason. It's so programmers can use reliable
safe code instead of trying to reinvent the functionality of an
operation for every project. CGI.pm is the standard for parsing form
data if you choose not to use it you are only limiting yourself and
putting your web site, server and users at risk.
.
- Follow-Ups:
- Re: Bareword errors?
- From: Gunnar Hjalmarsson
- Re: Bareword errors?
- Prev by Date: Re: Replacing variable names with values via reference in regexp
- Next by Date: Re: If Perl support inline scripting...
- Previous by thread: Re: Bareword errors?
- Next by thread: Re: Bareword errors?
- Index(es):
Relevant Pages
|