On Dec 2, 2003, at 3:40 PM, Dan Muey wrote: [..]
What Id' really like to be able to do is compile
it as simplepage.cgi and see if I can get it to do me a little page:

http://www.whatever.com/simplepage.cgi
Or
http://www.whatever.com/simplepage.cgi?name=waldo

This is a very cool idea, I'd love to be able to make it work!

Am I way off or any ideas??

Well I'm still not seeing what sort of 'gain' you would get with the 'c code' stuff when you already have two really good Perl based routes to take

a. classical perl cgi code the old fashion way

b. mod_perl for those who are more hip

Or do you think that only 'c code' can work as cgi????

I have some rantings and Ravings on a web-tool that
I built up at:

<http://www.wetware.com/drieux/CS/Proj/TPFH/>

If you have not taken the time to download the source
for 'cupsd' you might want to peek at it for one of
the better open sourced 'all singing, all dancing'
all 'c coded' CGI interfaced print manager. It was one
of several projects I rummaged through when looking at
which way I wanted to go with doing a 'web tool' - and
well, opted for Perl. Given that one of the targetted
OS Platforms HAS a mechanism for building perl5.8.1 for
it, but no JVM to run java, the options became, well,
sobering as to what could be done... Given the
JackBootedFascistThuggery of the Most Blessed and Divine,
all loving, all caring, all wise and all knowing,
Project Manager and Chief Architect, the option of
going with mod_perl was SHOT in the head for operational
reasons that Are Most Blessed And Hollowed....

{ for those of you who have never had the fun of coding
for a technical manager who HAS technical insights....
may you find the time to enjoy that luxury... }

You might also want to check out the web-min project
<http://www.webmin.com/> for some serious over the top
way tooo wicked cool perl based administration tools
that are done with perl and cgi.

So unless you REALLY are merely thrashing about for some
reason to Leap off the Deep End into embedding perl in c...

Please! Feel Free! empack what ever code into what ever
other code makes the abcyss fonder...

Now as for the code fragment:

my $perlcode = <<CODE;
        # instead of getting this via command line argument
        sub simplepage {
                my $name = shift || 'world';
                use CGI qw(header param);
                print header()
                print "I am perl hear me roar $name\n";
                print insult();
        }
        sub insult { return "So is ytour mother\n"; }
        return simplepage(param('name'));
CODE

printf eval_pv($perldoc);

what happens when the simple.cgi is called without arguments? eg: if there is no 'name' in the parameter list???

More importantly, how are you planning to differenciate
between say a 'POST' request, a 'HEAD' request, and a 'GET' request.



ciao
drieux

---


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to