Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

SavannahLion's scratchpad

by SavannahLion (Pilgrim)
on Jun 02, 2004 at 17:27 UTC ( #359587=scratchpad: print w/replies, xml ) Need Help??

I'm leaving off all the preliminary module code that you typically find in all Perl code.
#main script sub InitRequest { #Initatialize request data. $CGI::POST_MAX = $MaxPost; $CGI::DISABLE_UPLOADS = 0; # 0 = allow uploads. my $ncgi = new CGI; return $ncgi; #Read Cookies here? } sub DoBrowseRequest { my ($ncgi) = @_; my ($pagename, %pagedata); $pagename = 'TestPage'; #CODE STUB #[SNIP] SLRENDERE->HTMLMethod('', \%pagedata, $ncgi); } Sub DoRequest my $ncgi; $ncgi = &InitRequest; if ($ncgi) { &DoBrowseRequest($ncgi); #Do we need to return anything? } } &DoRequest(); 1;
The child script contains the following (what I hope is) relative code:
#SLRENDERE sub HTMLMethod { #my ($masterfile, $replacehref, $cgi) = @_; my ($masterfile, $replacehref, $cgi); do { $masterfile = shift(@_); } while ($masterfile eq $PackageName); $replacehref = shift(@_); $cgi = shift(@_); if ($cgi) { $cgi->header(-type => 'text/html'); } else { print "Content-type: text/html\n\n"; # Print out a very basic HTTP + header. } }
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2017-07-28 03:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (424 votes). Check out past polls.