Spoon::Base - Generic Spoon Base Class
Base class for application plugins. Provides basic functionality to all modules
inheriting from this class.
These subroutines are meant to be called bare, not as an object-method call.
See Spoon::Trace::trace().
Returns the configuration value for "name", if it can be found in the
config ($self->hub->config). Returns $default,
otherwise.
Return the application's hub object. See Spoon::Hub.
Inherited by all subclasses. Put your class initialization stuff here.
Die if the supplied argument is false.
Calls Spoon::Trace::mark(). See Spoon::Trace.
Copies a class instance. The copy is only a shallow one.
Returns a boolean, indicating whether we were called from a CGI interface.
Returns a boolean, indicating whether we were called from a test suite.
Tries to load a plugin. See Spoon::Hub::load_class().
Returns your plugin's directory. You can use this directory to store state.
Sanity check: ensure the specified variable exists in
%ENV. If the variable is not found, dies with a useful
error message.
Uses Data::Dumper to save a dump of one or more variables to the specified file.
Returns a boolean, indicating whether utf8 is available on this platform and
version of perl.
Encodes the string in utf8, if utf8 is available. Otherwise, returns
$string unmodified. See Encode::encode().
Decodes the string from utf8, if utf8 is available. Otherwise, returns
$string unmodified. See Encode::decode().
Escapes all invalid URI characters. See CGI::Util::escape().
Unescapes all invalid URI characters. See CGI::Util::unescape().
Escapes all reserved characters. The result is suitable for including verbatim
in an HTML document. See CGI::escapeHTML().
Escapes all reserved characters. The result is suitable for including verbatim
in an HTML document. See CGI::unescapeHTML().
Encodes the specified string into Base64. See
MIME::Base64::encode_base64().
Decodes the specified data from Base64. See
MIME::Base64::decode_base64().
* Document what Spoon::Base->debug() does.
Brian Ingerson <INGY@cpan.org>
Copyright (c) 2004. Brian Ingerson. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html