Introduction to the Badger Toolkit
Version: 0.06Badger::Intro is a Perl module that offers an introduction to the Badger Toolkit.
License: Perl Artistic License
Operating System: Linux
# 1) have more fun
# 2) get the job done quicker
# 3) make your code skimpier
# 4) finish work early
# 5) go skateboarding
# 6) enjoy life
The Badger toolkit is a collection of Perl modules designed to simplify the process of building object-oriented Perl applications. It provides a set of foundation classes upon which you can quickly build robust and reliable systems that are simple, skimpy and scalable.
Badger was hewn from the living rock of the Template Toolkit. It represents all the generic bits of TT that aren't directly related to template processing. They're also the same kind of generic modules that have appeared in pretty much every non-trivial Perl application I've written over the past 10 years or so. So Badger is essentially a restrospective generalisation of what I've learnt over that time about the right way (or more accurately, some of the less wrong ways) to build Perl applications.
Badger is designed to be lightweight, fast, and as simple as it can be without being too simple. It offers convenience, convention and consistency in an attempt to improve the Kwalitee of your code and make it more Skimpy™ (which is my artistic interpretation of what Michael Schwern refers to as skimmable code - that is, code that is easy to read and also easy to skim over).
Badger isn't just another object system. Although it does include functionality to simplify the process of building objects in Perl 5, that is really just a consequence of the larger goal. That is, to provide a self-contained set of OO modules that work together in a harmonious way to implement a basic platform upon which applications like TT can easily be built.
If you want a comprehensive, highly extensible, postmodern object system then Moose should almost certainly be at the top of your list. The parts of Badger that deal with object construction are in some ways similar to the functionality provided by Moose, not to mention various other object toolkits available from CPAN. However, Badger only goes as far as doing what it needs to in terms of object construction in order to get the rest of the job done. That is, providing a set of objects that do useful things.
Furthermore, the choice between Badger, Moose, or something else isn't an either-or decision. There are lots of things that Moose does, that Badger doesn't, and vice-versa. If you need a really powerful object system then Moose is probably the way forward. But that doesn't mean you can't use Badger's file handling tools, codecs, and other useful bits and pieces alongside your Moose classes. Metaphorically speaking, Badger and Moose are best friends and they play nicely together. Anyone for tennis?