Return-Path: Mailing-List: contact modperl-help@apache.org; run by ezmlm Delivered-To: mailing list modperl@apache.org Received: (qmail 94239 invoked from network); 24 Mar 2000 01:27:11 -0000 Received: from web4102.mail.yahoo.com (216.115.104.122) by locus.apache.org with SMTP; 24 Mar 2000 01:27:11 -0000 Message-ID: <20000324012633.25245.qmail@web4102.mail.yahoo.com> Received: from [206.160.168.2] by web4102.mail.yahoo.com; Thu, 23 Mar 2000 17:26:33 PST Date: Thu, 23 Mar 2000 17:26:33 -0800 (PST) From: Pradeep Hodigere Subject: Re: newbie To: Cliff Rayman Cc: modperl@apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N perl -MApache::File -e 'print "ok\n";' prints ok .. The code goes like this... It fails at the use Apache::File line with the error i had mentioned. package Apache::Footer; # file: Apache/Footer.pm use strict; use lib qw(/usr/local/apache/lib/perl/Apache ); use Apache::Constants qw(:common); use Apache::File (); sub handler my $r = shift; return DECLINED unless $r->content_type eq 'text/html'; my $file = $r->filename; unless(-e $r->finfo){ $r->log_error("File does't exist\n"); return NOT_FOUND; } my $modtime = localtime((stat _)[9]); my $fh; unless($fh = Apache::File->new($file)){ $r->log_error("Couldn't open file for reading.\n"); return SERVER_ERROR; } my $footer = < © 2000 Employee & Associates
Last Modified: $modtime END $r->send_http_header; while(<$fh>){ s!()!$footer$1!oi; }continue{ $r->print($_); } return OK; --- Cliff Rayman wrote: > What happens if you type at the command line? > > perl -MApache::File -e 1 > > If you receive no output - then Apache::File can > be found by perl. If this is the case - we will > need to see more info on how and where it is > being used to figure out what is wrong with your > config. > > cliff rayman > genwax.com > > Pradeep Hodigere wrote: > > > Hi, > > My @INC has the following path listed and > > Apache::File.pm is under > > /usr/lib/perl5/site_perl/5.005/i386-linux > > > > 0 /usr/lib/perl5/5.00503/i386-linux > > 1 /usr/lib/perl5/5.00503 > > 2 /usr/lib/perl5/site_perl/5.005/i386-linux > > 3 /usr/lib/perl5/site_perl/5.005 > > 4 . > > > > I have tried moving File.pm into the directory > and > > doing a "use File" with the same error result. > > > > Pradeep. > > > > --- "G.W. Haywood" wrote: > > > Hi there, > > > > > > On Thu, 23 Mar 2000, Pradeep Hodigere wrote: > > > > > > > Yep, > > > > @INC has the path where Apace::File > resides.I > > > tried > > > > even moving the module across and explicitly > > > "use"ing > > > > it but with no success.. > > > > > > I'm not 100 percent sure I understand you. > > > > > > What is the *full* path for your File.pm? > > > > > > 73, > > > Ged. > > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Talk to your friends online with Yahoo! Messenger. > > http://im.yahoo.com > > __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com