[SP-pm] DIE - Módulo Autoritários

Luis Motta Campos luismottacampos at yahoo.co.uk
Tue Aug 26 12:55:45 PDT 2008


Blabos de Blebe wrote:
> Eu nao afirmei que nao é pra tratar excecoes, muito pelo contrario.
> Agora chamar die de exception, é brincadeira. Voce tá me zuando, né!?

Como sempre, RTFM. Do manual do perl (perldoc -f die):

die LIST
   Outside an "eval", prints the value of LIST to "STDERR" and exits 
with the current value of $! (errno).  If $! is 0, exits with the value 
of "($? >> 8)" (backtick ‘command‘ status).  If "($? >> 8)" is 0, exits 
with 255.  Inside an "eval()," the error message is stuffed into $@ and 
the "eval" is terminated with the undefined value.  *This* *makes* 
*"die"* *the* *way* *to* *raise* *an* *exception*.

Grifo meu.

Sem comentários, Blabos. Não tem cerveja trapista para você da próxima 
vez que eu for ao Brasil. ;)

Putamplexos.
-- 
Luis Motta Campos is a software engineer,
Perl Programmer, foodie and photographer.


More information about the SaoPaulo-pm mailing list