in reply to Module Idea

I would personally think the thinng that can go very wrong here is the namespace. it sounds to me that your code solves a very specific problem.

Perhals it shold be a script instead?
If you think things here will be re-used.. then yeah.. module.

How will I, as a developer, interact with your module? Does your program/system basically tell me if ssi-exec is forbidden or not? Then I suggest that this is *one* of a set of utilities or helper functions your module should provide.

I can't freak out enough about the Namespace. Depending on what your code does. Do a search on CPAN for ssi, what do we get.. Doesn't seem to be anything about stats. You should look for Server Stats or something like that. I would say Apache.. Is SSI only available on Apache? Seems to me that your functinality fits in with App::Info::HTTPD::Apache.. no?

if that does not do the trick - then write App::Info::HTTPD::Apache::SSI , maybe.

Would I be able to interact with your code like:

use App::Info::HTTPD::Apache::SSI qw(status); my $status = status(); print "ssi on? ". $status->{ssi_on}; print "ssi exec on? ". $status->{exec_on};

What you suggest is interesting. I would love that for suexec etc.. Make the thing real open to what and how it can be asked, and conservative about how it talks back.

Replies are listed 'Best First'.
Re^2: Module Idea
by pileofrogs (Priest) on Aug 29, 2006 at 18:17 UTC

    I don't think I made myself quite clear. It's more of a test harness than a set of specific tests. You can use this to test if your php is working correctly, or if your cgi is working correctly, or anything that your web server does. I was using SSI as an example.

    I've written it as a module rather than as a script because I'd like it to be usable in various testing/monitoring systems. I've written a script that uses it for nagios, but I'd like it to be usable for mon, or anything else.

    As a developer, you would:

    1. Write a web page containing the tests (like my SSI example)
    2. Write a script that...
      1. uses LWP::UserAgent or similer (lynx -source ?) to get the html from that page
      2. feeds the html into my $cw = CheckWeb->new($html)
      3. Then use $cw to do something with the results, ala if ( $cw->all_pass ) { ... do something... }

    Does that make sense?

    P.S.

    I'm calling it CheckWeb in my own head for now. I'll ask for help coming up with a real name once I'm closer to releasing it.