That's because the $r you get from shift isn't interchangable with the
$r you get from Apache2::Request (which I think is deprecated anyway).
Try doing
sub handler {
my $r = shift;
my $q = Apache2::Request->new($r);
my %ins = &processInput($q);
...
$r->print($html);
return OK;
}
Harry Zhu wrote:
>
> sub handler {
> my $r = Apache2::Request->new(shift);
> my %ins = &processInput($r);
> ...
> $r->print($html);
> return OK;
> }
>
> Can't locate auto/Apache2/Request/print.al in @INC (@INC contains:
> /www/modperl /usr/local/lib/perl5/5.8.7/i686-linux
> /usr/local/lib/perl5/5.8.7
> /usr/local/lib/perl5/site_perl/5.8.7/i686-linux
> /usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl .
> /usr/local/apache2) at /www/modperl/Sys/Handler.pm line 81
>
> if change "$r->print" to "print", it works fine. A quick browsing
> through the MP2 documents for the example handler, some using print
> while others using $r->print (without Apache2::Request), does $r->print
> under Apache2::Request?
>
> Harry Zhu
>
>
>
> Apache/2.2.0 (Unix) mod_ssl/2.2.0 OpenSSL/0.9.7a DAV/2
> mod_apreq2-20050712/2.1.3-dev mod_perl/2.0.2 Perl/v5.8.7
> and
> perl_module (shared)
> apreq_module (shared)
>
>
> perl -V
> Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
> Platform:
> osname=linux, osvers=2.6.9-5.el, archname=i686-linux
> uname='linux deskweb1.glworkgroup 2.6.9-5.el #1 wed jan 5 19:22:18
> est 2005 i686 i686 i386 gnulinux '
> config_args='-des -Uusethreads'
> hint=recommended, useposix=true, d_sigaction=define
> usethreads=undef use5005threads=undef useithreads=undef
> usemultiplicity=undef
> useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
> use64bitint=undef use64bitall=undef uselongdouble=undef
> usemymalloc=n, bincompat5005=undef
> Compiler:
> cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
> optimize='-O2',
> cppflags='-fno-strict-aliasing -pipe -I/usr/local/include
> -I/usr/include/gdbm'
> ccversion='', gccversion='3.4.3 20041212 (Red Hat 3.4.3-9.EL4)',
> gccosandvers=''
> intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
> d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
> ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
> lseeksize=8
> alignbytes=4, prototype=define
> Linker and Libraries:
> ld='cc', ldflags =' -L/usr/local/lib'
> libpth=/usr/local/lib /lib /usr/lib
> libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
> perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
> libc=/lib/libc-2.3.4.so, so=so, useshrplib=false, libperl=libperl.a
> gnulibc_version='2.3.4'
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
> cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
>
>
> Characteristics of this binary (from libperl):
> Compile-time options: USE_LARGE_FILES
> Built under linux
> Compiled at Oct 20 2005 14:29:14
> @INC:
> /usr/local/lib/perl5/5.8.7/i686-linux
> /usr/local/lib/perl5/5.8.7
> /usr/local/lib/perl5/site_perl/5.8.7/i686-linux
> /usr/local/lib/perl5/site_perl/5.8.7
> /usr/local/lib/perl5/site_perl