Sean P. Quinlan > SQCAS-0.24 > SQCAS::Apache

Download:
SQCAS-0.24.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.8   Source  

NAME ^

SQCAS::Apache - Basic functions for SQCAS mod_perl handlers & CGI's

SYNOPSIS ^

  use SQCAS::Apache;

ABSTRACT ^

  This should be the abstract for SQCAS::Apache.
  The abstract is used when making PPD (Perl Package Description) files.
  If you don't want an ABSTRACT you should also edit Makefile.PL to
  remove the ABSTRACT_FROM option.

DESCRIPTION ^

Export DEBUG sensitive error handeling, including logging and warnings. Configures set_message from CGI::Carp

EXPORT

error, gripe, warning_notes

get_session_id()

Get the current session ID.

Parameters: - None

Return value: - session id from the session table

get_cookie()

 Get the a cookie for the site based on its name

 Parameters:
  - Name of the cookie

 Return value:
  - Cookie value. Might need additional parsing for the separate parts

error

gripe

Generate debug sensitive warnings and exceptions. gripe also writes warnings to Apaches note pad ($r-notes($tag => $msg)>) so that warning_notes method can return all warnings generated..

Suggested debug level usage (as level goes up messages from earlier levels should continue to be sent):

0: Production. Perls warnings should _not_ be turned on and no debug messages should be generated.

1: Basic development level. Perls warnings are turned on. Basic debug messages should be generated. Call confess to die. *

2: Shotgun debugging. Code should now be generating debug messages when entering and/or exiting important blocks so that program flow can be observed. Now calls cluck for warn.

3: Turns on Perls diagnostics. At this level messages should be generated for every pass through loops. This would also be the appropriate level to dump data structures at critical points. It is realistic to expect hundreds of lines of output at _least_ at this level.

4: Autodie - gripe will now throw a fatal exception with confess. Currently this happens the first time called. However it realy should only happen the first time a message not intended to be sent at levels 1-3 only.

* Usually debug statements are created during development or debugging calling gripe with no if $DEBUG statement, and once a piece of code is working properly an if $DEBUG = n> statement is added tp the end, with n set to the appropriate level as described above.

warning_notes

Returns all the warnings generated to date for this request. If called in scalar context returns all the warnings as an HTML formatted warning message, or an empty string if no warnings. This allows the return value of warning_notes to be placed directly in response. If called in list context returns a list of all the warning messages.

TO DO ^

Add get_session_id from DNAcore::WWW (well, conceptually anyway) as get_session_token.

HISTORY ^

0.01

Original version; created by h2xs 1.22 with options

  -AXC
        -n
        SQCAS::Apache

SEE ALSO ^

Mention other useful documentation such as the documentation of related modules or operating system documentation (such as man pages in UNIX), or any relevant external documentation such as RFCs or standards.

If you have a mailing list set up for your module, mention it here.

If you have a web site set up for your module, mention it here.

AUTHOR ^

Sean Quinlan, <seanq@localdomain>

COPYRIGHT AND LICENSE ^

Copyright 2004 by Sean Quinlan

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