James G Smith > Uttu > Uttu::Handler

Download:
Uttu-0.06.tar.gz

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

Uttu::Handler

DESCRIPTION ^

This documents the interface expected for an Uttu content handler.

METHODS ^

Uttu calls the methods in the following order:

  Uttu::Handler::class -> init();
  my $h = Uttu::Handler::class -> config($cfg, $param);
  $h -> file_to_path($u->config->global_function_set_base, $file);
  $h -> handle_request($u, $r);
init
  Uttu::Handler::class -> init();

This method should initialize the configuration process using Uttu - define( )> as well as load any required Perl modules. Configuration should be able to proceed after this returns with no errors if the configuration file is correct.

config
  Uttu::Handler::class -> config($cfg, $param);

This method should create a new Uttu::Handler::class object properly configured to handle requests based on the AppConfig object ($cfg) and the Apache::Param object ($param).

handle_request
  $self -> handle_request($u, $r);

This method actually hands the request off to the proper module. $u is the controlling Uttu object and $r is the familiar Apache->request object.

file_to_path
  $self -> file_to_path($function_set_base, $file);

Given a relative filename, return the absolute filename. This should take into account any search paths defined by the content handler.

AUTHOR ^

James G. Smith <jsmith@cpan.org>

COPYRIGHT ^

Copyright (C) 2002 Texas A&M University. All Rights Reserved.

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

$ Id: $