I've also been using cgiwrap for a long time, and I loooove it.

The idea of a cgiwrapped module doesn't really make sense. You need to launch your script with cgiwrap, then it will load your modules and you'll be happy.

Instead of making your application and trying to figure out CGIwrap with it, make a few really simple scripts that test the functionality of CGIwrap. Then, once you've figured out CGIwrap, tackle your application.

Here's what I'd recommend.

Step 1) Make a really dopey whoami script..

#! /usr/bin/perl -w -T print $<;

I don't know if that will actually work. You might have to make it generate HTML tags, headers, etc... The important part is that it's a really simple script that only does one thing, which is print your UID.

Step 2) Make a similarly dopey script that reads your config file. Maybe even a shell script, like this:

#! /bin/bash cat /home/me/myfiles/.config

When you're making the whoami script work, you might struggle with CGIwrap's funny URL convention. Make sure you understand it before you go any further. For example:

If you have a script at /home/me/myfiles/cgi-bin/woot.pl

You'd have to call it as http://myserver/cgi-bin/cgiwrap/me/woot.pl

Your ISP can customise that, and they might even set up helpers to make it easier... Just make sure you understand it.

Good Luck

--Pileofrogs


In reply to Re^3: Structuring a Web site and security issues by pileofrogs
in thread Structuring a Web site and security issues by bradcathey

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.