CatalystX::Declare::Keyword::Component - Declare Catalyst Components


CatalystX-Declare documentation Contained in the CatalystX-Declare distribution.

Index


Code Index:

NAME

Top

CatalystX::Declare::Keyword::Component - Declare Catalyst Components

DESCRIPTION

Top

This handler provides common functionality for all component handlers. Please refer to the respective keyword handler documentation for more information:

CatalystX::Declare::Keyword::Model
CatalystX::Declare::Keyword::View
CatalystX::Declare::Keyword::Controller

SUPERCLASSES

Top

MooseX::Declare::Syntax::Keyword::Class

ROLES

Top

METHODS

Top

These methods are implementation details. Unless you are extending or developing CatalystX::Declare, you should not be concerned with them.

add_namespace_customizations

    Object->add_namespace_customizations (Object $ctx, Str $package)

This will simply add CLASS to the imported modules, to make CLASS and $CLASS available in the component.

default_superclasses

    List[Str] Object->default_superclasses ()

Returns Catalyst::Component as default superclass for components. The subclasses for other component keywords will usually want to override this.

SEE ALSO

Top

CatalystX::Declare
CatalystX::Declare::Keyword::Model
CatalystX::Declare::Keyword::View
CatalystX::Declare::Keyword::Controller
class in MooseX::Declare

AUTHOR

Top

See AUTHOR in CatalystX::Declare for author information.

LICENSE

Top

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


CatalystX-Declare documentation Contained in the CatalystX-Declare distribution.

use MooseX::Declare;

class CatalystX::Declare::Keyword::Component
    extends MooseX::Declare::Syntax::Keyword::Class
    with    CatalystX::Declare::DefaultSuperclassing {


    before add_namespace_customizations (Object $ctx, Str $package) {

        $ctx->add_preamble_code_parts(
            'use CLASS',
        );
    }

    method default_superclasses { 'Catalyst::Component' }
}

__END__