Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

oylenshpeegul (9338)

  (email not shown publicly)
+ -

  Comment: Scope bashing? (Score 1) on 2009.10.18 12:57

Calling my comment on SO "scope bashing" is unfair. I'm all in favor of scoping everything as tightly as possible. Indeed, I agree with everything in chromatic's post. But I still think the practice of wrapping a Perl script in a main subroutine is not "best" or even good. I maintain it's an antipattern that indicates the author is a C programmer, not a Perl programmer. In chromatic's example, $sth has tighter scope than the other variables, but in the first case, it's declared along with the rest. Wrapping the whole thing in a subroutine doesn't change that. You still have to do everything he talked about.
Read More 5 comments
Comments: 5
+ -

  Comment: Non-English posts are fine! (Score 1) on 2009.10.15 5:44

by oylenshpeegul on 2009.10.15 5:44 (#70896)
Attached to: now back to work (again?)
Actually, over here we were just talking about how much fun they are!
Read More 3 comments
Comments: 3