Andy Wardley > Template-Plugin-Colour > Template::Colour::Class

Download:
Template-Plugin-Colour-0.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

Template::Colour::Class - class metaprogramming module for Template::Colour

SYNOPSIS ^

An example showing how Template::Colour::RGB uses Template::Colour::Class:

    package Template::Colour::RGB;

    use Template::Colour::Class
        version   => 2.09,
        debug     => 0,
        base      => 'Template::Colour',
        constants => 'ARRAY HASH SCHEME :RGB',
        utils     => 'is_object',
        as_text   => 'HTML',
        is_true   => 1,
        throws    => 'Colour.RGB';

DESCRIPTION ^

This module is a simple subclass of Badger::Class which other Template::Colour modules use to add a bit of class metaprogramming magic.

It can be used in exactly the same way as Badger::Class to help with the definition of various class items. For example, the Template::Colour::RGB modules uses it like this:

    package Template::Colour::RGB;

    use Template::Colour::Class
        version   => 2.09,
        debug     => 0,
        base      => 'Template::Colour',
        constants => 'ARRAY HASH SCHEME :RGB',
        utils     => 'is_object',
        as_text   => 'HTML',
        is_true   => 1,
        throws    => 'Colour.RGB';

The only difference between Template::Colour::Class and Badger::Class is that the constants are loaded from Template::Colour::Constants. This is a subclass of Badger::Constants which adds constant definitions used by the colour modules.

AUTHOR ^

Andy Wardley <abw@cpan.org>, http://wardley.org

COPYRIGHT ^

Copyright (C) 2006-2012 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.

SEE ALSO ^

Badger::Class

syntax highlighting: