in reply to Re: Re: Re: Re: Problem creating a function
in thread Problem creating a function

It may crash 50% of the time, but it only takes one crash to alert the programmer to her misuse of the function. It's incumbent on the programmer to know how to call the API correctly. Especially if it's her own.

The simple fact is that perl is a dynamic language, and provides many essential features that can only be fully realized at "run time". That means run time errors (i.e. exceptions) are going to happen, you can count on it, and if you're a half-way careful programmer, you're going to prepare for them to happen. If the fact that your program is a CGI makes this preparation a little more difficult, well then, tough. Deal with it. Trap $SIG{__DIE__} if you have to. But don't forbid run-time exceptions, because you can't anyway. What does   $foo->bar; do? There are several possibilities, including Can't locate object method "bar", and none of them can be caught at compile time. That's just the nature of the beast (Perl).

jdporter
...porque es dificil estar guapo y blanco.