From owner-freebsd-questions Mon Feb 11 5:59:20 2002 Delivered-To: freebsd-questions@freebsd.org Received: from pc1-dale5-0-cust136.not.cable.ntl.com (pc1-dale5-0-cust136.not.cable.ntl.com [80.1.76.136]) by hub.freebsd.org (Postfix) with SMTP id 3767F37B404 for ; Mon, 11 Feb 2002 05:59:12 -0800 (PST) Received: (qmail 10484 invoked from network); 11 Feb 2002 13:59:06 -0000 Received: from localhost (HELO matt.thebigchoice.com) (127.0.0.1) by localhost with SMTP; 11 Feb 2002 13:59:06 -0000 Date: Mon, 11 Feb 2002 13:59:06 +0000 From: Matt H To: "mpd" Cc: questions@FreeBSD.ORG Subject: Re: apache/mod perl not friendly Message-Id: <20020211135906.36d241dd.matt@proweb.co.uk> In-Reply-To: <20020210193323.A38732@rochester.rr.com> References: <20020210193323.A38732@rochester.rr.com> X-Mailer: Sylpheed version 0.7.0 (GTK+ 1.2.10; i386--freebsd4.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 10 Feb 2002 19:33:23 -0500 "mpd" wrote: > Hi, > > I felt like doing something new, so I installed mod_perl. I can fully recommend O'Reilly's "Writing Apache Modules with perl and c" as seen at http://www.modperl.com Another good place to look of course is : http://perl.apache.org/ Anyway here's an example : ----- file : /usr/local/lib/perl/Apache/Hello.pm ------- package Apache::Hello; use Apache::Constants qw(:common); sub handler { my $r = shift; $r->content_type('text/html'); $r->send_http_header; $r->print("HI"); return OK; } 1; ------- httpd.conf entry -------------- .. snip other stuff ... SetHandler perl-script PerlHandler Apache::Hello To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message