Question
I have a Perl application that reads two databases (based on dates given) and compares the databases, putting the output in a twiki table form for display in twiki. I wondered if I could get the whole thing to work from twiki... the user would start with a twiki page that had a blank table and a way to enter two dates (text box or "date" ability of the
EditTable). Once these dates are entered, the user would click on something (hyperlink or button) that would start up my general purpose Perl application and have it's result displayed back on the page. How do I pass the dates to my perl program and how can I tell the perl program to start? I have looked at some of the documentation for plugins and add-ons and my frustration level has increased, so I decided to ask and see if my specific question could be directly answered. If possible, simple examples would be helpful since I am obviously new at this!
Environment
--
JimKulikowski - 02 May 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
I have a similar requirement, but I haven't found a single direct answer on this. Here's what I'm planning to do (when I get "a round tuit"):
- Enable the new Perl script:
- Location:
<Drive>:\...\bin\<script name>
- "Shebang" ('hash-bang', the first line):
#!<Drive>://.../perl/bin/perl -wT
- You didn't mention what your web server is, but authentication is usually not required for new Perl scripts on Apache. I haven't tried this, but if you need users to be authenticated:
- Edit
.conf and look for other scripts that require authentication (e.g., edit and attach).
- You may also need to change
$TWiki::cfg{AuthScripts}
- URL:
http://<host>/bin/<script name>
- Pass parameters to it with a form. See my user page at TWiki.org for an example.
- Write the script's output to the
TWiki/data/ directory so it will be available as a topic.
- Redirect back to the topic with the form.
The topic with the form also displays the generated table using an
%INCLUDE$nop%.
--
SeanCMorgan - 06 May 2008