[sf-perl] Related to Perl Best Practices / a Perl::Critic Rule

Dan Lyke danlyke at flutterby.com
Thu Feb 25 08:29:04 PST 2010

On Thu, 25 Feb 2010 07:34:49 -0800
Brian Friday <brian.friday at gmail.com> wrote:
> If the print had a $var call in it, this croak does not stop you from
> printing on uninitialized values. I have been mulling it over but for
> print itself I have not been able to find a definitive "this is a
> good idea because...." .

Just a guess: You're basically not checking the return call from
"write". If you were printing to a socket or a file, it might be
important to know if that call failed.

And almost always, I think you want a "die" if that call fails, but I
can see where asking daemon coders to wrap socket prints in eval{}
statements isn't the right thing.


More information about the SanFrancisco-pm mailing list