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.
Meta programming (Score:1)
I think Perl has continually defied these attempts to package patterns because of it's meta programmability.
Things we previously thought were not possible to package are now on CPAN as usable modules.
Design patterns are thus getting more and more refined, and in time converge simply with the best practices for the software that helps to implement them.
In the Java community metaprogramming is a much more difficult thing, so in order to produce extensible, reusable and clean code you need to have a much stric
Re: (Score:1)
bah, i meant attempts to *define*
Badger::Debug (Score:1)
I also use the $DEBUG/DEBUG idiom in pretty much every module I write. Being rather lazy I wrote Badger::Debug to do the job for me.
If you add the following to the top of your module:
package Your::Module;
use Badger::Debug default => 0;
Then you'll get both the $DEBUG package variable and DEBUG compile time constant defined for you (in this case, set to 0). The end result is almost exactly as per your example.
It also has a 'modules' option which you can use to
Higher-Order Perl as a catalog of design patterns (Score:1)
Your pattern *is* implemented in a CPAN module (Score:1)
See ifdef [cpan.org].
In response to the criticism that it is a source filter, it filters for content within pod sections, which avoids almost all of the ambiguities that otherwise make parsing Perl so fun.
Re: (Score:1)