[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Off topic: PHP vs (Mac)Perl?



I think a lot of the discussion centering around Perl (the language) are kind of academic, meant in the sense of abstract and theoretical, with little bearing on meeting project deadlines. As far as I'm concerned, unless you intend selling your scripts as professional, industry standard software for say, air traffic control or core fission monitoring programs, they only have to be as polished or as functional as the task they were conceived for requires, if your work can't/doesn't suit the conditions you want to use them in, then maybe you should think about finding another inplementation to solve your problem:
In other words - pretty good and even ok suffices, below that I start looking about for something else.

That said I haven't tried PHP, but then I don't see any reason to:

If I need to worry about the layout of a HTML page, it's easy enough to create a template with variables as place holders and parse this as you would any other text, it's quick, I can do it with a regular HTML editor, and I don't have to learn yet another implementation by someone else which will give me endless options I'm never going to use

As to handling headers cookies and other hidden parts of web documents:

If speed isn't critical (ie you're not servicing billions of hits a second) a couple of minutes with the docs and CGI.pm are usually enough to come up with something robust and usable.
If speed does worry you (because you like to find the edges of your/perl's abilities) access the %ENV variables of the server hits and you won't have the overhead of loading an external module, and you can pare the functions contained in the script down to a minimum, but you will have to spend longer in the development stage.
The bottom line is:
G=(P=T*D*LC)
G=gnosis (knowledge learnt) P=project T=time D=difficulty LC=learning curve