Re: PHP Modules? and perl.
gunzip <none@none.co m> wrote:
[color=blue]
> OK, Perl is an all-purpose language so maybe we shouldn't expect it to make
> decisions about its core based on the same criteria as PHP's. I reckon it
> will probably become largely the preserve of sysadmins in the long run, though.[/color]
Well, sysadmins and maybe big ticket n-server stuff. For average joe
with an ISP, perl is pretty much useless for the web side. Larger
companies that for some reason aren't using Java and have access to the
details of the server(s) can still make use of perl'ish stuff. Dedicated
servers are also useful places for perl.
In Average Joe's world, perl is still good for cron jobs or even CGI
scripts, things that aren't really meant to be hit all that often.
(such as a script that creates a tarball of backup files and sends it
across the browser or something) I would never attempt to use PHP as a
cron process except as a last resort.
One thing perl has that I've never really seen in PHP is the
eval { ... }; exception handling stuff.
Wish it were possible (in PHP) to do this:
eval {
something() or die("Failed at something");
something_else( ) or die("Failed at something_else" );
};
if($@){
cleanup_resourc es();
die($@);
}
.. continue ..
or even a try { } catch { }
PHP seems to require a special die handler function and a whole lot of
overhead just to mimic exceptions. (even then, the functions generally
don't die() on a problem, so you have to check the return value.)
Ah well.. I'm kinda deviating from modules here. :-)
Jamie
--
http://www.geniegate.com Custom web programming
User Management Solutions Perl / PHP / Java / UNIX
gunzip <none@none.co m> wrote:
[color=blue]
> OK, Perl is an all-purpose language so maybe we shouldn't expect it to make
> decisions about its core based on the same criteria as PHP's. I reckon it
> will probably become largely the preserve of sysadmins in the long run, though.[/color]
Well, sysadmins and maybe big ticket n-server stuff. For average joe
with an ISP, perl is pretty much useless for the web side. Larger
companies that for some reason aren't using Java and have access to the
details of the server(s) can still make use of perl'ish stuff. Dedicated
servers are also useful places for perl.
In Average Joe's world, perl is still good for cron jobs or even CGI
scripts, things that aren't really meant to be hit all that often.
(such as a script that creates a tarball of backup files and sends it
across the browser or something) I would never attempt to use PHP as a
cron process except as a last resort.
One thing perl has that I've never really seen in PHP is the
eval { ... }; exception handling stuff.
Wish it were possible (in PHP) to do this:
eval {
something() or die("Failed at something");
something_else( ) or die("Failed at something_else" );
};
if($@){
cleanup_resourc es();
die($@);
}
.. continue ..
or even a try { } catch { }
PHP seems to require a special die handler function and a whole lot of
overhead just to mimic exceptions. (even then, the functions generally
don't die() on a problem, so you have to check the return value.)
Ah well.. I'm kinda deviating from modules here. :-)
Jamie
--
http://www.geniegate.com Custom web programming
User Management Solutions Perl / PHP / Java / UNIX
Comment