Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2015-07-30 04:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls