----- Original Message ----- 
From: "Hacksaw" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 06, 2003 8:38 PM
Subject: eval and __LINE__


> Caveat: It's late and I'm tired and frustrated, i.e. I'm pissy.
>
> I want to have something like die, but for the web, so I want it to print
out
> the error with a <br> at the end, etc.
>
> How the F### do I get __LINE__ to be evaluated, not where it is in the
program
> file, but where the function is called?
>
> Another way of asking this is, how would I rewrite the die function in
perl?
>
> TIA... Sleep now...

Hi -

1) use Carp; - it shows errors from the caller's
    perspective. Look at the docs, but you car use
    'carp' (warinig) or 'croak' (die).
2) the perl built-in function 'caller' gives line and
    script name information for the caller, the caller's
    caller, etc. Check the docs to roll your own carp.
3) Go to sleep.

Aloha => Beau;



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to