Christopher Jones > LIMS-Controller-1.6b > LIMS::Web::Interface

Download:
LIMS-Controller-1.6b.zip

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.4   Source  

NAME ^

LIMS::Web::Interface - Perl object layer to work between a LIMS database and its web interface

DESCRIPTION ^

LIMS::Web::Interface is an object-oriented Perl module designed to be the object layer between a LIMS database and its web interface. It inherits from LIMS::Base and provides automation for HTML/CGI services required by a LIMS web interface, enabling rapid development of Perl CGI scripts. See LIMS::Controller for information about setting up and using the LIMS modules.

METHODS ^

get_cgi

Returns the embedded CGI object. It is recommended that you use the object-oriented style of calling CGI methods, although you probably don't HAVE to.

is_back_sensitive

Prevents the user from using the back button on their browser by rejecting an old session_id.

page_title

Returns the page title, set in the new() and new_guest() methods.

param_forward

Forwards all current parameters as hidden values. (Hidden in a '4-year old playing hide-and-seek' kind of way - in the HTML).

min_param_forward

Forwards only 'user_name' and 'session_id' parameters as hidden values

format_url_base_query

Formats 'user_name' and 'session_id' parameter values to append to a cgi script's url

format_redirect

Pass a script name to format a url to the script with 'user_name' and 'session_id' parameter values

format_redirect_full

Pass a script name to format a url to the script with all parameters

javascript

Creates a <script> tag in the HTML header for defining Javascript code. You can pass either an array ref containing one or more URLs to javascript files, or a HERE string of formatted javascript code.

finish

Tidies up at the end of a script; prints a page footer (if there is one) and forwards parameters if not already performed.

Handling Errors

One of the main reasons for writing the LIMS modules was because I wanted to be able to deal with all errors - Perl, CGI, DBI - in a more efficient manner, all at the same time. When using LIMS::Web::Interface in isolation, then the methods standard_error() and any_error() do the same thing, and the kill_pipeline() method prints out errors upon killing the script. If you have a simple situation where you want to kill the script with an error you've caught in your script, you can combine the error with the kill_pipeline() method;

        $database->kill_pipeline('got a problem');

Errors can be returned in text (rather than HTML) format by calling the method text_errors(), or printed separately without calling kill_pipeline() using the print_errors() method. If you need to, you can clear errors using clear_all_errors().

SEE ALSO ^

LIMS::Base, LIMS::Controller, LIMS::Database::Util

AUTHORS ^

Christopher Jones and James Morris, Translational Research Laboratories, Institute for Women's Health, University College London.

http://www.instituteforwomenshealth.ucl.ac.uk/trl

c.jones@ucl.ac.uk, james.morris@ucl.ac.uk

COPYRIGHT AND LICENSE ^

Copyright 2007 by Christopher Jones

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

syntax highlighting: