The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

lib/mktemp-validedit.pl - Given a template handle, check the template exists

SYNOPSIS

  require "$ROADS::Lib/mktemp-validedit.pl";
  &CheckValidTemplate;

DESCRIPTION

This package defines a function CheckValidTemplate which, given a template handle, tries to find out whether it exists in the ROADS database.

METHODS

CheckValidTemplate;

This function examines the CGI variable originalhandle and tries to open an existing template with this handle. If unsuccessful it returns a page of HTML to explain what went wrong.

FILES

config/multilingual/*/mktemp/notemplates.html - HTML returned if no template mappings file (alltemps) could be found.

config/multilingual/*/mktemp/nonexistent.html - HTML returned if the template file itself couldn't be opened.

guts/alltemps - default location of template handle to filename mappings.

BUGS

We shouldn't be reading alltemps directly - should use the ROADS::ReadTemplate abstractions instead. Should also simply return an error code if the template couldn't be found rather than bombing out.

SEE ALSO

"mktemp.pl" in admin-cgi

COPYRIGHT

Copyright (c) 1988, Martin Hamilton <martinh@gnu.org> and Jon Knight <jon@net.lut.ac.uk>. All rights reserved.

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

It was developed by the Department of Computer Studies at Loughborough University of Technology, as part of the ROADS project. ROADS is funded under the UK Electronic Libraries Programme (eLib), the European Commission Telematics for Research Programme, and the TERENA development programme.

AUTHOR

Jon Knight <jon@net.lut.ac.uk>