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
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
You're NOT gonna need it (Score:2)
Doing the simplest thing possible in a lot of cases is to just return a hash of data. I've found that if you return a blessed hash with proper methods (using C
But it's so easy ... (Score:2)
So since it's so easy, why not just do it?
YAGNI (Score:1)
namespaces (Score:1)
GPA, but here goes:
Though inheritance is usually needless complexity, and functional programming
with ADTs is the One True Way, using packages in Perl *is* still very
convenient. It lets you push the functions on your ADT into the namespace of
that package, instead of having one huge function namespace. So instead of
oparate_on_foo($foo) and operate_on_bar($
Yes indeed. (Score:1)
This is true. However, I think I can clarify -- if your code needs to be maintained and there is a chance that it might need to be extended in the future, then a little work up front will pay off big time. By putting the behaviours in a class you can avoid action-at-a-distance that might apear later. And yes, 'You Ain't Gonna Need It' is a valid comment. But then again, XP isn't a dogma, its a good starting point.
When behavior starts to creep into your da
Mwah hah hah ha! (Score:1)