Stas Bekman wrote:
[...]
No ... I haven't gotten that far ... I'm just trying to run a script from the command line. The following works just fine on my Linux box ...


Hehe, that's your problem. Apache:: modules don't work from the command line, since the modperl/apache runtime environment is not loaded. perhaps Apache::Scoreboard should be patched to require 'mod_perl', I'll look into adding it.

Try with this patch:


Index: Changes
===================================================================
RCS file: /home/stas/cvs/modules/Apache-Scoreboard/Changes,v
retrieving revision 1.1
diff -u -r1.1 Changes
--- Changes     2003/10/20 19:58:24     1.1
+++ Changes     2003/10/20 20:01:37
@@ -1,3 +1,10 @@
+0.11 -
+
+require mod_perl from .pm files, so users trying to run it from the
+command line will get the right error message.
+
+require mod_perl 1.x
+
 0.10 - February 8, 2000

 fixed core dump in $image->servers($i), thanks to Stas for the spot
Index: Scoreboard.pm
===================================================================
RCS file: /home/stas/cvs/modules/Apache-Scoreboard/Scoreboard.pm,v
retrieving revision 1.1
diff -u -r1.1 Scoreboard.pm
--- Scoreboard.pm       2003/10/20 19:58:24     1.1
+++ Scoreboard.pm       2003/10/20 20:01:37
@@ -4,6 +4,11 @@
 use constant DEBUG => 0;

 BEGIN {
+    use mod_perl;
+    die "mod_perl < 2.0 is required" unless $mod_perl::VERSION < 1.99;
+}
+
+BEGIN {
     no strict;
     $VERSION = '0.10';
     @ISA = qw(DynaLoader);
Index: Dummy/DummyScoreboard.pm
===================================================================
RCS file: /home/stas/cvs/modules/Apache-Scoreboard/Dummy/DummyScoreboard.pm,v
retrieving revision 1.1
diff -u -r1.1 DummyScoreboard.pm
--- Dummy/DummyScoreboard.pm    2003/10/20 19:58:24     1.1
+++ Dummy/DummyScoreboard.pm    2003/10/20 20:01:37
@@ -3,6 +3,11 @@
 use strict;
 use DynaLoader ();

+BEGIN {
+    use mod_perl;
+    die "mod_perl < 2.0 is required" unless $mod_perl::VERSION < 1.99;
+}
+
 {
     no strict;
     $VERSION = '0.04';


__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com



Reply via email to