LIMS::Web::Interface - Perl object layer to work between a LIMS database and its web interface
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.
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.
Prevents the user from using the back button on their browser by rejecting an old session_id.
session_id
Returns the page title, set in the new() and new_guest() methods.
new()
new_guest()
Forwards all current parameters as hidden values. (Hidden in a '4-year old playing hide-and-seek' kind of way - in the HTML).
Forwards only 'user_name' and 'session_id' parameters as hidden values
'user_name'
'session_id'
Formats 'user_name' and 'session_id' parameter values to append to a cgi script's url
Pass a script name to format a url to the script with 'user_name' and 'session_id' parameter values
Pass a script name to format a url to the script with all parameters
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.
<script
HERE
Tidies up at the end of a script; prints a page footer (if there is one) and forwards parameters if not already performed.
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;
standard_error()
any_error()
kill_pipeline()
$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().
text_errors()
print_errors()
clear_all_errors()
LIMS::Base, LIMS::Controller, LIMS::Database::Util
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 2007 by Christopher Jones
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install LIMS::Controller, copy and paste the appropriate command in to your terminal.
cpanm
cpanm LIMS::Controller
CPAN shell
perl -MCPAN -e shell install LIMS::Controller
For more information on module installation, please visit the detailed CPAN module installation guide.