MooseX::MetaDescription::Meta::Class - Custom class metaclass for meta-descriptions


MooseX-MetaDescription documentation  | view source Contained in the MooseX-MetaDescription distribution.

Index


NAME

Top

MooseX::MetaDescription::Meta::Class - Custom class metaclass for meta-descriptions

SYNOPSIS

Top

  package Foo;
  use metaclass 'MooseX::MetaDescription::Meta::Class' => (
      description => {
          'Hello' => 'World',
      }
  );
  use Moose;

  package Bar;
  use Moose;

  extends 'Foo';

  # always add it *after* the extends
  __PACKAGE__->meta->description->{'Hello'} = 'Earth';

  package Baz;
  use Moose;

  extends 'Bar';

  package Gorch;
  use metaclass 'MooseX::MetaDescription::Meta::Class' => (
      description => {
          'Hello' => 'World'
      }
  );    
  use Moose;

  extends 'Baz';  

  # ...

  Foo->meta->description # { 'Hello' => 'World', 'World' => 'Hello' }
  Bar->meta->description # { 'Hello' => 'Earth', 'World' => 'Hello' } # change one, inherit the other  
  Baz->meta->description # { 'Hello' => 'Earth', 'World' => 'Hello' } # inherit both 
  Gorch->meta->description # { 'Hello' => 'World' } # overrides all, no inheritance   

DESCRIPTION

Top

This module provides the custom metaclass to add Meta Descriptions to your classes. It provides a limited degree of inheritance of meta-descriptions, the details of which are shown above in the SYNOPSIS section.

METHODS

Top

NOTE: these are methods composed into this class from MooseX::MetaDescription::Meta::Trait refer to that module for the complete description.

description
metadescription_classname
metadescription
meta

BUGS

Top

All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.

AUTHOR

Top

Stevan Little <stevan.little@iinteractive.com>

COPYRIGHT AND LICENSE

Top


MooseX-MetaDescription documentation  | view source Contained in the MooseX-MetaDescription distribution.