In reviewing some software I ran across the requirement in one software package for Apache::Request, so I did the good ol' cpan install for libapreq (or rather attempted the cpan install) without any success (on win32).

Not to be dissuaded so easily I downloaded the package from cpan and did a manual install. Nothing flashed by onscreen during 'nmake'. There appeared to be no tests defined, so 'nmake install' showed activity of copying .pm files to the appropriate locations, and navigating to those directories showed modules were in fact located where they should be located.

Ok, wonderful, all looks good, so I add the 'include' line into httpd.conf and attempt to stop and start apache, but apache squawks "Can't locate loadable object for module Apache::Request in @INC ... "

Further investigation reveals no binaries in the site/lib/auto/apache/request directory, although there is indeed c code in the install package, as well as code in Makefile.pl to distinguish between win32 and other os types for creating the makefile. Maybe a win32 problem? So next I tried it on a RH 7.1 box with a fresh build of perl 5.6.1 on it. Same process, CPAN first this time with a successful build and compiler instructions racing by on the screen. I verified that there was indeed a file named "Request.so" in the auto subdir, and ran this test script:

#! /usr/bin/perl use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); use Apache::Request; use Data::Dumper; print header; print "hello world<br>"; my $r; eval {$r = Apache::Request->new();}; print "$@ <br>"; print Dumper($r); map { print "$_<br>" } @INC;

Which spits out the following:

hello world
Can't locate object method "new" via package "Apache::Request"
(perhaps you forgot to load "Apache::Request"?)
at /usr/local/apache/cgi-bin/testapache.pl line 13.
$VAR1 = undef; 
/usr/local/lib/perl5/5.6.1/i586-linux
/usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/i586-linux
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl

So my questions are:



ryddler

In reply to Apache::Request, myth or reality? by ryddler

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.