Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: mod_perl configuration error?

by Yohimbe (Pilgrim)
on Jan 26, 2001 at 23:13 UTC ( [id://54615]=note: print w/replies, xml ) Need Help??


in reply to Re: mod_perl configuration error?
in thread mod_perl configuration error?

hmm. Tall order. try this: standard form of a mod_perl routine:
#!/usr/bin/perl -w
use strict;
packate Foo;
use CGI;
use MyLibrary;
sub handler {
	my $q = new CGI;
	my $someparam=$q->param('someparam');
	$someparam=MyLibrary::FooProcess($someparam);
	my $output ="Hello and welcome to FooCo!"
	if ($someparam eq 'foo') {
		# handle foo
		$output .= "You said Foo! heh heh!";
	}
	else {
		# default
		$output .= "Nobody gives me any input";
	}
	print $q->header,$output;
	return;
}
## and the mod_perl config 

<Location /cgi-bin/foo.pl>
        SetHandler perl-script
        PerlHandler Foo
</location>

Does your code differ dramatically from this?
--
Jay "Yohimbe" Thorne, alpha geek for UserFriendly

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://54615]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-23 22:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found