[SP-pm] Exceptions com file handle

Renato Santos renato.cron at gmail.com
Thu Jul 18 06:27:56 PDT 2013


Você pode usar um sigleton pra abrir o log na primeira vez, e depois ir
appendando no arquivo e chamar de qualquer lugar da app. Pode ser dentro de
role, nao importa.

package LogCSV;
use MooseX::Singleton;
sub loga_ca_bagaca {}
-----
Qualquer lugar depois:

my $log = LogCSV->instance;
...
$log->loga_ca_bagaca;


2013/7/18 Junior Moraes <junior at fvox.com.br>

> Hi.
>
> Em 18 de julho de 2013 10:16, Renato Santos <renato.cron at gmail.com>escreveu:
>
>  vai ter tanta exception assim?!
>>
>> -- anyway
>>
>> global variable ? Log4perl ?
>>
>
> Vai sim. =(
>
> Não testei variáveis globais, pensei que também seria "resetada" assim
> como os attrs.
> O Log4perl escreve CSV? Desconhecia! Vou dar uma caçada!
>
> Valeuz, Cron!
>
> []'s
>
> --
> ====================================
> Junior "fvox" Moraes
> Perl Programmer
> Linux Reg. #557527
> junior[at]fvox[dot]com[dot]br
> fb[dot]com/fvox
> twitter[dot]com/fvox
> ====================================
>
> =begin disclaimer
>    Sao Paulo Perl Mongers: http://sao-paulo.pm.org/
>  SaoPaulo-pm mailing list: SaoPaulo-pm at pm.org
>  L<http://mail.pm.org/mailman/listinfo/saopaulo-pm>
> =end disclaimer
>
>


-- 
Saravá,
Renato CRON
http://www.renatocron.com/blog/
@renato_cron <http://twitter.com/#!/renato_cron>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/saopaulo-pm/attachments/20130718/268c51bc/attachment.html>


More information about the SaoPaulo-pm mailing list