install Apache::Cookie for Win32? was: mod_perl setup for w2k?

2000-06-22 Thread Tom Roche

Tom Roche 6/16/00 6:52PM
 I`ve also found Randy Kobes` mod_perl binaries at

 ftp://theoryx5.uwinnipeg.ca/pub/other/ 

 and am planning to try perl-win32-bin-0.6.exe. If anyone has already
 gotten mod_perl running on w2k, I`d appreciate your recommendations
 (or pointers to documentation)

"Russell Lundberg" [EMAIL PROTECTED] 6/17/00 12:01:17 PM 
 I got Randy's mod_perl binary running on my Thinkpad 600 with no
 problem. snip You'll be surprised how easy it is.

 Thanks Randy for the perl-win32-bin-0.6.exe binary.

Indeed! I bow in the general direction of Winnipeg. A few tweaks to
httpd.conf-perl, install the service per

http://apache.org/docs/windows.html

and Apache::Hello is doing its thing on w2k. 

However, the site that I want to port from Solaris Apache to Windows
Apache uses Apache::Cookie, so I got

 [error] Can't locate Apache/Cookie.pm in @INC

in the error_log. I was unable to install the module using CPAN.pm
(seems to be a combination of server directories not being where
CPAN.pm wants them to be, and the win32 ncftpget.exe not taking the
switches CPAN.pm wants to give it), so I copied the .../Apache.pm and
.../Apache/*.pm from the working Solaris site. Now I get

 [error] Can't locate loadable object for module Apache::Cookie in
 @INC ... at d:/ProgramFiles/Perls/GNU/site/5.6.0/lib/mod_perl.pm
 line 14

which is

 if ($ENV{MOD_PERL}) {
 (defined {$class.'::bootstrap'} ?
  \{$class.'::bootstrap'} :
  \DynaLoader::bootstrap)-
  ($class, $version);
 }

After a bit of research, I'm wondering: 

? Is this libapreq related? If so, is there a libapreq for win32? I've
  seen the ominous

  Re: failure: libapreq + win32
  Doug MacEachern ([EMAIL PROTECTED])
  Mon, 10 May 1999 14:40:20 -0700 (PDT)

  and am hoping someone's gotten this working in the past year (oh
  please :-) Otherwise, is there a workaround?

? If not, what's wrong?

? Is there a win32 installer for Apache::Cookie out there anywhere?

Also (admittedly offtopic): can anyone provide assistance with getting
CPAN.pm to run on a non-ActivePerl win32, such as the 5.6 provided
with the Kobes install? Pointers to resources would be appreciated.

Please reply directly to me as well as the list/group (I'm on the
digest), and TIA, [EMAIL PROTECTED]




Re: install Apache::Cookie for Win32?

2000-06-22 Thread Tom Roche

"Russell Lundberg" [EMAIL PROTECTED] 6/17/00 12:01:17 PM 
 Thanks Randy for the perl-win32-bin-0.6.exe binary.

On Thu, 22 Jun 2000, Tom Roche wrote:
 Indeed! I bow in the general direction of Winnipeg. A few tweaks to
 httpd.conf-perl, install the service per
 http://apache.org/docs/windows.html and Apache::Hello is doing its
 thing on w2k.

 However, the site that I want to port from Solaris Apache to
 Windows Apache uses Apache::Cookie 
snip
 I get

 [error] Can't locate loadable object for module Apache::Cookie in
 @INC ... at d:/ProgramFiles/Perls/GNU/site/5.6.0/lib/mod_perl.pm
 line 14

 After a bit of research, I'm wondering: 

 ? Is this libapreq related? If so, is there a libapreq for win32?

Randy Kobes [EMAIL PROTECTED] 6/22/00 4:45:12 PM 
 Apache::Cookie comes in the libapreq package, so you
 do need this installed. I'm not aware of anyone being able
 to build this on Win32 - I tried, but without success.
 But it would be quite useful to have - I'll try again.

Thanks! Your efforts are appreciated.

Also, just wondering: would a "back port" from Apache::Cookie back to
CGI::Cookie likely degrade mod_perl's performance too greatly?
Unfortunately, at present our site needs to work with an external
redirector (WRAP) that requires cookies.

TIA, [EMAIL PROTECTED]




test for mod_perl? for IIS?

2000-05-31 Thread Tom Roche

I'm working on a project that has been running as CGI on Netscape and
IIS. We were told to port to mod_perl on Apache. Now it seems we must
also run on CGI on IIS and on Apache: three platforms total.

Testing $ENV{'GATEWAY_INTERFACE'} allows us to detect CGI, but
(correct me if I'm wrong) not whether that CGI is on Apache or IIS.
What I'd like to know is the "right way" to test, from within a script,

* whether one is running under mod_perl? Currently we're doing

 if($ENV{'GATEWAY_INTERFACE'} =~ /^CGI-Perl\//) {
   $MOD_PERL = 1;
 } else {
   $MOD_PERL = 0;
 }

* whether one is running under IIS?

Please reply directly to me as well as the list/group (I subscribe the
digest), and TIA, [EMAIL PROTECTED] 




Re: how to get Devel::Symdump working with mod_perl code?

2000-05-09 Thread Tom Roche

On Thu, 4 May 2000, Tom Roche wrote:
 I'm trying to use Devel::Symdump to document code, snip
 Unfortunately Loader, or rather Perl, is having a problem with
 Apache::DBI.pm. The first source file require's OK. The second
 source file, GetDBs.pm, use's Apache::DBI(), line 202 of which is

 ) if ($INC{'Apache.pm'} and Apache-module('Apache::Status'));

Doug MacEachern [EMAIL PROTECTED] 5/5/00 6:11:43 PM 
 that's because Apache::module is only defined when you're running
 inside httpd. that line should be something like:

 if ($INC{'Apache.pm'} and $ENV{MOD_PERL} and
Apache-module('Apache::Status'));

 to work inside and outside httpd.

Thanks! That fix got me past that problem ... but only to the next
problem. Apparently httpd, mod_perl, etc are doing many things "behind
the scenes" which a "normal" Perl doesn't do (presumably unless told).
E.g. I'm now getting

 Can't locate loadable object for module Apache::Symbol in @INC (@INC
 contains: c:/Perls/ActivePerl522/site/lib/Apache/DBI
 c:/Perls/ActivePerl522/site/lib/Apache c:/Perls/ActivePerl522/lib
 c:/Perls/ActivePerl522/site/lib .) at
 c:/Perls/ActivePerl522/lib/IO/File.pm line 109

despite the fact that Symbol.pm is in
c:/Perls/ActivePerl522/site/lib/Apache, which is in @INC. Which returns
me to the original problem:

What does one need to do to run Devel::Symdump (for documentation
purposes) on code written to run (and running) under mod_perl? I'm
currently running a driver that require's/use's the relevant scripts,
and another driver that calls Symdump on them, under a "normal" Perl
process outside of Apache. If there's a way to run Symdump inside
Apache, I'd appreciate how-to's, or pointers to same.

Can someone provide, or point me to, as comprehensive a list as
possible of what needs to be done?

Please reply directly to me as well as the list/group, and
TIA, [EMAIL PROTECTED] 




how to get Devel::Symdump working with mod_perl code?

2000-05-04 Thread Tom Roche

I'm trying to use Devel::Symdump to document code, but Perl
is choking when it hits (what appears to me to be) autoloadable
stuff. I'd like to know how to invoke (or patch, or whatever) Perl in
such a way so as to ignore such problems (or perhaps merely warn/carp
about them), or how to run Devel::Symdump under Apache.

I've started working on a project that has several 10**4 lines of cgi
Perl currently running on a Netscape server. We're porting it to
mod_perl on Apache, and meanwhile trying to document the code, learn
more about it, and better structure it. (The code is pretty much just
one big collection of subroutines.) Note that the mod_perl code is
currently running in a development environment (separate database,
webserver, etc).

Among the data I'd like to acquire, for each user-defined subroutine
in each source file, are

1 a list of the variables used within the subroutine

2 a list of all the user-defined subroutines called within the
  subroutine

I've checked out all the source files into an offline directory (not
in Apache space). I've got a tags script that will get a list of all
the subroutines defined in each file, as well as do (1), but not
(2). Symdump seems like it should provide both. However, before I can
use it I've got to get Perl to load the code, hence the problem.

To learn more about Symdump I've written a driver, sub_scanner.pl, and
an auxilliary Loader.pm. Loader merely require's all our scripts.
sub_scanner require's Loader and Devel::Symdump, then tries to use the
latter as illustrated in the Symdump POD:

 @packs = qw(Loader);
 # $obj = Devel::Symdump-new(@packs);# no recursion
 $obj = Devel::Symdump-rnew(@packs);   # with recursion

 # Methods
 @packages = $obj-packages;
 @scalars = $obj-scalars;
 @arrays = $obj-arrays;
 @hashes = $obj-hashes;
 @functions = $obj-functions;
 @ios = $obj-ios;
 @unknowns = $obj-unknowns;

 @todo = (\@packages,
  \@scalars,
  \@arrays,
  \@hashes,
  \@functions,
  \@ios,
  \@unknowns);

 foreach $ref (@todo) {
   foreach $item (@$ref) {
 print STDOUT "$item\n";
   }
   print STDOUT "\n";
 }

Unfortunately Loader, or rather Perl, is having a problem with
Apache::DBI.pm. The first source file require's OK. The second source
file, GetDBs.pm, use's Apache::DBI(), line 202 of which is

 ) if ($INC{'Apache.pm'} and Apache-module('Apache::Status'));

When I do 'perl sub_scanner.pl' (or just 'perl Loader.pm') I get

 Can't locate object method "module" via package "Apache" at
 /external/apps/perl5/lib/site_perl/5.005/Apache/DBI.pm line 202.
 BEGIN failed--compilation aborted at
 /external/apps/apache/mod_perl/dev/GetDBs.pm line 7.

Yet this same code runs under mod_perl, so I assume its interpreter must
be
doing something differently. Is there a way to get my "normal" Perl to
behave similarly, and load the code for Symdump to do its thing? Is
there a way Symdump can access the Apache interpreter's symbol table?
Is there some entirely different way to do what I'm trying to do?

Please reply directly to me as well as the list/group, and TIA,
[EMAIL PROTECTED]