Badger
view release on metacpan or search on metacpan
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. It also acts as a delegate to various other standard
utility modules (Scalar::Util, List::Util, List::MoreUtils,
Hash::Util and Digest::MD5). 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" senses 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
http://wardley.org/
COPYRIGHT
Copyright (C) 1996-2022 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.
( run in 1.363 second using v1.01-cache-2.11-cpan-b16cb0d3907 )