Ricardo SIGNES > Querylet-CGI-0.142 > Querylet::CGI::Auto

Download:
Querylet-CGI-0.142.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.141   Source   Latest Release: Querylet-CGI-0.143

NAME ^

Querylet::CGI::Auto - run a querylet as context suggests

VERSION ^

version 0.141

 $Id: /my/cs/projects/q/cgi/trunk/lib/Querylet/CGI/Auto.pm 28047 2006-11-14T23:39:22.135386Z rjbs  $

SYNOPSIS ^

 use Querylet;
 use Querylet::CGI::Auto;
 use Querylet::Output::Text;

 query:
   SELECT firstname, age
   FROM people
   WHERE lastname = ?
   ORDER BY firstname
 
 input type: auto
 output format: text

 input: lastname

 query parameter: $input->{lastname}

DESCRIPTION ^

Querylet::CGI::Auto registers the "auto" input handler, which will use "cgi" if the GATEWAY_ENVIRONMENT environment variable is set, and "term" otherwise. Since Querylet::CGI will set the output format on its own, the output format should be set to the type to be used if running outside of a CGI environment.

METHODS ^

default_type

Querylet::CGI::Auto acts as a Querylet::Input module, and registers itself as an input handler when used. The default type to register is 'auto'

handler

The default registered handler will (ack!) use magic goto to switch to the correct handler, based on the environment.

AUTHOR ^

Ricardo SIGNES, <rjbs@cpan.org>

BUGS ^

Please report any bugs or feature requests to bug-querylet-cgi@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT ^

Copyright 2004-2006 Ricardo SIGNES, All Rights Reserved.

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

syntax highlighting: