[SP-pm] Printer.pm - aberto a comentários.

Lindolfo "Lorn" Rodrigues lorn.br at gmail.com
Fri Jan 29 05:32:30 PST 2010


mantovani++ # justificando suas ações com perldoc

2010/1/29 Daniel de Oliveira Mantovani <daniel.oliveira.mantovani em gmail.com>

> Meu código é todo identado com perltidy!
>
> Aonde meu código é espremido ?
> http://github.com/mantovani/WWW-IBM/blob/master/lib/WWW/IBM.pm
>
> *Identar com oito espaços é extremamente horrível, e não é uma boa
> prática.*
>
>
>
> 2010/1/29 Nelson Ferraz <nferraz em gmail.com>:
> >> Q frescura! porque não simplesmente:
> >> my $file = 'enterprise.txt'
> >> eval{open my $fabricante,'<', $file};
> >> if($!){
> >>                print "\nProblemas ao abrir o arquivo '$file'  -  $!";
> >> }else {
> >> #Alguma coisa util aqui...
> >>
> >> }
> >
> > Uma razao simples: consistencia.
> >
> > A forma mais usada pela comunidade e':
> >
> > open my $f, '<', $file or die "Can't open: $!\n";
> > # ...
> > close $f;
> >
> > Se voce escrever de maneira diferente, todo mundo que for ler seu
> > codigo vai ter que parar por um momento e analisar o codigo, para
> > tentar descobrir porque diabos voce fez daquele jeito.
> >
> > TIMTOWTDI nao significa que voce deve, necessariamente, fazer tudo de
> > uma maneira diferente.
> >
> > --
> > Nelson Ferraz
> >
> > Free Software Foundation Associate Member #3203
> > Projeto Software Livre Brasil (www.softwarelivre.org.br)
> > Sociedade Perl do Brasil (www.perl.org.br)
> > Rede Livre de Compartilhamento de Cultura Digital
> > _______________________________________________
> > SaoPaulo-pm mailing list
> > SaoPaulo-pm em pm.org
> > http://mail.pm.org/mailman/listinfo/saopaulo-pm
> >
>
>
>
> --
> "If you’ve never written anything thoughtful, then you’ve never had
> any difficult, important, or interesting thoughts. That’s the secret:
> people who don’t write, are people who don’t think."
> _______________________________________________
> SaoPaulo-pm mailing list
> SaoPaulo-pm em pm.org
> http://mail.pm.org/mailman/listinfo/saopaulo-pm
>



-- 
lorn at lornlab dot org
Lindolfo "Lorn" Rodrigues
-------------- Pr?xima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/saopaulo-pm/attachments/20100129/1d828bc9/attachment-0001.html>


More information about the SaoPaulo-pm mailing list