The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Helix::Core::Controller - base controller class for Helix Framework application.

SYNOPSIS

Controller for example application (lib/Example/Controller/Example.pm):

    package Example::Controller::Example;
    use base qw/Helix::Core::Controller/;

    sub default : Default
    {
        my $r;

        $r = Helix::Core::Registry->get_instance;
        $r->{"cgi"}->send_header;

        print "Hello there!";
    }

    1;

DESCRIPTION

The Helix::Core::Controller class contains methods to construct application controllers. 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 Helix::Core::Router.

This class should never be used directly.

METHODS

MODIFY_CODE_ATTRIBUTES($class, $code, @attrs)

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.

FETCH_CODE_ATTRIBUTES($class, $code)

Returns array of attributes for given $code reference in given $class.

SEE ALSO

Helix, Helix::Core::Router

LICENSE

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

AUTHOR

Anton Belousov, <abel@cpan.org>

COPYRIGHT

Copyright (c) 2009, Atma 7, http://www.atma7.com