NAME
    Badger - Perl Application Programming Toolkit

SYNOPSIS
        use Badger;
            
        # 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

WARNING
    This is the fourth version of the Badger Toolkit. It is now being used
    as the foundation for a number of other Perl modules and is believed to
    be reliable and reasonably bug-free.  However it should still be treated 
    as an alpha software as some elements of the API or internal 
    architecture may be subject to change.  See the Changes file for 
    information on what has changed between versions 0.01 and 0.04.

DESCRIPTION
    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, sexy 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.  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[tm] (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).
    
  Overview
    Let's take a quick frolic through the feature list forest to get an idea
    what "Badger" is all about.

    Foundation classes for OO programming
        Badger includes base classes for creating regular objects
        (Badger::Base), mixin objects (Badger::Mixin), prototypes/singletons
        (Badger::Prototype), factory classes (Badger::Factory) and central
        resource hubs (Badger::Hub).

    Class Metaprogramming
        The Badger::Class module employs metaprogramming techniques to
        simplify the process of defining object classes. It provides methods
        to automate many of the annoying trivial tasks required to
        "bootstrap" an object class: specifying base classes, version
        numbers, exportable symbols, defining constants, loading utility
        functions from external modules, creating accessor and mutator
        methods, and so on. There are also methods that simplify the process
        of accessing class data (e.g. package variables) to save all that
        mucking about in symbols tables. Some of these methods will also
        account for inheritance between related classes, making it much
        easier to share default configuration values between related
        classed, for example.
        
        A key feature of Badger::Class is that it does this by a process of
        "hygienic class construction".  What this means in practice is that
        your object classes don't get polluted with methods that are only
        used to construct the class (e.g. a method that constructs accessor
        methods).

        Badger::Class can itself be subclassed, allowing you to build your
        own metaprogramming modules tailored to your particular needs.

    Error handling and debugging
        Base classes and mixin modules provide functionality for both *hard
        errors* in the form of exception-based error handling and *soft
        errors* for declining requests (e.g. to fetch a resource that
        doesn't exist) that aren't failures but require special handling.
        Methods for debugging and raising general warnings are also
        provided. Generic hooks are provided for receiving notification of,
        or implementing custom handling for errors, warnings and declines.
        Running alongside this is a generic message formatting system that
        allow you to define all error/warning/debug messages in one place
        where they can easily be localised (e.g. to a different spoken
        language) or customised (e.g. to generate HTML format instead of
        plain text).

    Symbol Exporter
        Badger implements an object oriented version of the Exporter module
        in the form of Badger::Exporter. It works correctly with respect to
        class inheritance (that is, a subclass automatically inherits the
        exportable symbols from its base classes) and provides a number of
        additional features to simplify the process of defining exportable
        symbols and adding custom import hooks.

    Standard utilities and constants.
        The Badger::Utils module provides a number of simple utility
        functions of its own as well as acting as a delegate to various
        other standard utility modules (e.g. Scalar::Util, Digest::MD5,
        etc). Badger::Constants defines various constants used by the Badger
        modules and also of general use. Both these modules are designed to
        be subclassed so that you can create your own collections of utility
        functions, constants, and so on.

    Filesystem modules
        The Badger::Filesystem module and friends provide an object-oriented
        interface to a filesystem. Files and directories are represented as
        Badger::Filesystem::File and Badger::Filesystem::Directory objects
        respectively. As well as being useful for general filesystem
        manipulation (in this respect, they are very much like the
        Path::Class modules), the same modules can also be used to represent
        virtual filesystems via the Badger::Filesystem::Virtual module. This
        allows you to "mount" a virtual file system under a particular
        directory (useful when you're dealing with web sites to map page
        URLs, e.g. /example/page.html, to the source files, e.g.
        /path/to/example/page.html). You can also create a virtual file
        system that is a composite of several root directories (if you're
        familiar with the Template Toolkit then think of the way the
        "INCLUDE_PATH" works).

    Codec modules
        Going hand-in-hand with many basic filesystem operations, the codec
        modules provide a simple object interface for encoding and decoding
        data to and from any particular format. The underlying functionality
        is provided by existing Perl modules (e.g. MIME::Base64, Storable,
        YAML, etc). The codec modules are wrappers that provide a standard
        interface to these various different modules. It provides both
        functional and object oriented interfaces, regardless of how the
        underlying module works. It also provides the relevant hooks that
        allow codec objects to be composed into pipeline sequences.

    Free
        Badger is Open Source and "free" in both "free beer" and "free
        speech" senese of the word. It's 100% pure Perl and has no external
        dependencies on any modules that aren't part of the Perl core.
        Badger is the base platform for version 3 of the Template Toolkit
        (coming RSN) and has portability and ease of installation as primary
        goals. Non-core Badger add-on modules can make as much use of CPAN
        as they like (something that is usually to be encouraged) but the
        Badger core will always be dependency-free to keep it
        upload-to-your-ISP friendly.

FURTHER INFORMATION
    See the documentation included with the Badger modules, starting with
    Badger.pm.  Or look online:

       http://badgerpower.com/ 

AUTHOR
    Andy Wardley <abw@wardley.org>

COPYRIGHT
    Copyright (C) 1996-2008 Andy Wardley. All Rights Reserved.

    This module is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

