Eidolon::Core::Attributes - base class for application controllers (only when Eidolon::Driver::Router::Basic router driver is used).
Controller for example application (lib/Example/Controller/Example.pm):
lib/Example/Controller/Example.pm
package Example::Controller::Example; use base qw/Eidolon::Core::Attributes/; sub default : Default { my $r; $r = Eidolon::Core::Registry->get_instance; $r->cgi->send_header; print "Hello there!"; } 1;
The Eidolon::Core::Attributes class contains methods to construct application controllers for Eidolon::Driver::Router::Basic router driver. Each controller should contain at least 1 method for request handling. Request routing is done with help of code attributes. For additional information about routing please refer to Eidolon::Driver::Router::Basic.
This class should never be used directly.
Is called when perl finds a method attribute. $class - package name, in which the attribute was found, $code - code reference, @attrs - array of attributes for this method.
$class
$code
@attrs
Returns array of attributes for given $code reference in given $class.
Eidolon, Eidolon::Driver::Router::Basic
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Anton Belousov, <abel@cpan.org>
Copyright (c) 2009, Atma 7, http://www.atma7.com
To install Eidolon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Eidolon
CPAN shell
perl -MCPAN -e shell install Eidolon
For more information on module installation, please visit the detailed CPAN module installation guide.