Apache-Action

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    It is normal to write a class which inherits Apache::Action::State,
    which generates and caches nonserialisable or non-normalised data on
    demand. Things like user id may be stored in the session, and the state
    may then provide a 'user' method which reads the user-id from the
    session and retrieves the user from the database, caching the object for
    the duration of the request. See eg/State.pm in this distribution for an
    example.

    Loaded modules may register actions with Apache::Action using the
    'register' call, as described above. When an Apache::Action is 'run', it
    looks for the field 'action' in the HTTP request parameters. This field
    is of the form "application/module/action". It will then call the
    appropriate subref, passing itself as the one and only parameter.

    When using this module with HTML::Mason, it is normal to exoprt the
    state and the session into the HTML::Mason::Commands namespace so that
    they can be accessed by pages.

METHODS
    Apache::Action->register($app, $module, $action)
        Register a new action with Apache::Action. This is a class method

lib/Apache/Action.pm  view on Meta::CPAN

It is normal to write a class which inherits Apache::Action::State,
which generates and caches nonserialisable or non-normalised  data
on demand. Things like user id may be stored in the session, and
the state may then provide a 'user' method which reads the user-id
from the session and retrieves the user from the database, caching
the object for the duration of the request. See eg/State.pm in this
distribution for an example.

Loaded modules may register actions with Apache::Action using the
'register' call, as described above. When an Apache::Action is 'run',
it looks for the field 'action' in the HTTP request parameters. This
field is of the form "application/module/action". It will then call the
appropriate subref, passing itself as the one and only parameter.

When using this module with HTML::Mason, it is normal to exoprt the
state and the session into the HTML::Mason::Commands namespace so
that they can be accessed by pages.

=head1 METHODS

=over 4



( run in 0.612 second using v1.01-cache-2.11-cpan-64827b87656 )