Jeffrey Ray Hallock > Gapp-App-0.007 > Gapp::App::Role::HasComponents

Download:
Gapp-App-0.007.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.007   Source  

NAME ^

Gapp::App::Role::HasComponents - Role for app with components

SYNOPSIS ^

  package Foo::App;
  
  use Moose;

  extends 'Gapp::App';

  with 'Gapp::App::Role::HasComponents';

  sub BUILD {

    ( $self ) = @_;
    
    $com = .... ; # your custom component here

    $self->register_component( 'foo', $com );

  }

  package main;

  $app = Foo::App->new;
  
  $app->com('foo')->browser->show_all;

DESCRIPTION ^

Applications built using components are highly extensible.

PROVIDED METHODS ^

com $name

Returns the component object registered with the given $name.

register_component $name, $com

Register the component with the application.

AUTHORS ^

Jeffrey Ray Hallock <jeffrey.hallock at gmail dot com>

COPYRIGHT & LICENSE ^

Copyright (c) 2012 Jeffrey Ray Hallock.

    This is free software, licensed under:

    The Artistic License 2.0 (GPL Compatible)
syntax highlighting: