head	1.3;
access;
symbols
	RELEASE_8_3_0:1.3
	RELEASE_9_0_0:1.3
	RELEASE_7_4_0:1.3
	RELEASE_8_2_0:1.3
	RELEASE_6_EOL:1.2
	RELEASE_8_1_0:1.2
	RELEASE_7_3_0:1.2
	RELEASE_8_0_0:1.2
	RELEASE_7_2_0:1.2
	RELEASE_7_1_0:1.2
	RELEASE_6_4_0:1.2
	RELEASE_5_EOL:1.2
	RELEASE_7_0_0:1.2
	RELEASE_6_3_0:1.2
	PRE_XORG_7:1.2
	RELEASE_4_EOL:1.2
	RELEASE_6_2_0:1.2
	RELEASE_6_1_0:1.1
	RELEASE_5_5_0:1.1
	RELEASE_6_0_0:1.1;
locks; strict;
comment	@# @;


1.3
date	2011.01.15.17.16.55;	author sunpoet;	state Exp;
branches;
next	1.2;

1.2
date	2006.04.17.15.18.37;	author philip;	state Exp;
branches;
next	1.1;

1.1
date	2005.06.17.11.10.08;	author philip;	state Exp;
branches;
next	;


desc
@@


1.3
log
@- Update to 2.09.2 and unbreak this port
- Add WWW while I'm here

Changes:	http://search.cpan.org/dist/Apache-Scoreboard/Changes
PR:		ports/153759
Submitted by:	Jarrod Sayers <jarrod@@downtools.com.au>
Feature safe:	yes
@
text
@--- Makefile.PL.orig	2008-01-22 03:17:41.000000000 +0800
+++ Makefile.PL	2011-01-16 01:12:53.000000000 +0800
@@@@ -45,7 +45,7 @@@@
     clean        => {
         FILES => "@@{ clean_files() }",
     },
-    INC => join " ", $extra_inc, ModPerl::MM::get_def_opt('INC'),
+    INC => join " ", "-I%%LOCALBASE%%/%%APACHEINCLUDEDIR%%/modules/perl/", $extra_inc, ModPerl::MM::get_def_opt('INC'),
 );
 
 sub clean_files {
--- Dummy/Makefile.PL.orig	2008-01-22 03:17:31.000000000 +0800
+++ Dummy/Makefile.PL	2011-01-16 01:13:41.000000000 +0800
@@@@ -29,6 +29,6 @@@@
 ModPerl::MM::WriteMakefile(
     NAME	 => 'Apache::DummyScoreboard',
     VERSION_FROM => 'DummyScoreboard.pm',
-    INC => join " ", $extra_inc, ModPerl::MM::get_def_opt('INC'),
+    INC => join " ", "-I%%LOCALBASE%%/%%APACHEINCLUDEDIR%%/modules/perl/", $extra_inc, ModPerl::MM::get_def_opt('INC'),
 
 );
@


1.2
log
@Update to 2.08.
@
text
@d1 3
a3 13
--- Makefile.PL.orig	Mon Apr 17 17:08:56 2006
+++ Makefile.PL	Mon Apr 17 17:10:29 2006
@@@@ -30,13 +30,18 @@@@
 Apache::TestMM::filter_args();
 Apache::TestMM::generate_script('t/TEST');
 
+# XXX: this is a hack!
+my $extra_inc = "-I%%LOCALBASE%%/include/apache2/modules/perl/";
+
 ModPerl::MM::WriteMakefile(
     NAME         => 'Apache::Scoreboard',
     VERSION_FROM => 'lib/Apache/Scoreboard.pm',
     PREREQ_PM    => \%require,
d6 3
a8 4
-    }
+    },
+    # XXX: this is a hack!
+    INC => join " ", $extra_inc, ModPerl::MM::get_def_opt('INC')
d12 3
a14 9
--- Dummy/Makefile.PL.orig	Mon Apr 17 17:12:37 2006
+++ Dummy/Makefile.PL	Mon Apr 17 17:13:12 2006
@@@@ -18,7 +18,12 @@@@
 
 genxs();
 
+# XXX: this is a hack!
+my $extra_inc = "-I%%LOCALBASE%%/include/apache2/modules/perl/";
+
d18 3
a20 2
+    # XXX: this is a hack!
+    INC => join " ", $extra_inc, ModPerl::MM::get_def_opt('INC')
@


1.1
log
@Unbreak after the recent mod_perl2 api dance.

Approved by:	krion (mentor)
Obtained from:	svn.perl.org (mostly)
@
text
@d1 3
a3 132
Index: t/conf/modperl_extra.pl
===================================================================
--- t/conf/modperl_extra.pl	(revision 187)
+++ t/conf/modperl_extra.pl	(working copy)
@@@@ -1,12 +1,10 @@@@
-use Apache2;
-
 use ModPerl::Util (); #for CORE::GLOBAL::exit
 
-use Apache::RequestRec ();
-use Apache::RequestIO ();
-use Apache::RequestUtil ();
+use Apache2::RequestRec ();
+use Apache2::RequestIO ();
+use Apache2::RequestUtil ();
 
-use Apache::Const -compile => ':common';
+use Apache2::Const -compile => ':common';
 use APR::Const -compile => ':common';
 
 unless ($ENV{MOD_PERL}) {
Index: t/conf/extra.conf.in
===================================================================
--- t/conf/extra.conf.in	(revision 187)
+++ t/conf/extra.conf.in	(working copy)
@@@@ -16,7 +16,7 @@@@
 # module build first though, see Apache-Test's c-modules for know-how)
 # LoadModule scoreboard_send_module @@ServerRoot@@/../apxs/.libs/mod_scoreboard_send.so
 #<Location /scoreboard2>
-     SetHandler scoreboard-send-handler
+#     SetHandler scoreboard-send-handler
 #</Location>
 
 
@@@@ -28,10 +28,10 @@@@
 #</Location>
 
 ##### DEVMODE: Remove in production ###
-PerlModule Apache::Reload
-PerlInitHandler Apache::Reload
+PerlModule Apache2::Reload
+PerlInitHandler Apache2::Reload
 PerlSetVar ReloadAll Off
-PerlSetVar ReloadModules "Apache::VMonitor"
+PerlSetVar ReloadModules "Apache::Scoreboard"
 PerlSetVar ReloadDebug On
 
 #PerlModule Apache::Response
Index: t/response/TestInternal/basic.pm
===================================================================
--- t/response/TestInternal/basic.pm	(revision 187)
+++ t/response/TestInternal/basic.pm	(working copy)
@@@@ -5,13 +5,13 @@@@
 
 use Apache::Test;
 
-use Apache::Response ();
-use Apache::RequestRec ();
+use Apache2::Response ();
+use Apache2::RequestRec ();
 
 use Apache::Scoreboard ();
 use MyTest::Common ();
 
-use Apache::Const -compile => 'OK';
+use Apache2::Const -compile => 'OK';
 
 sub handler {
     my $r = shift;
@@@@ -26,7 +26,7 @@@@
     my $image = Apache::Scoreboard->image($r->pool);
     MyTest::Common::test2($image);
 
-    Apache::OK;
+    Apache2::Const::OK;
 }
 
 1;
Index: lib/Apache/Scoreboard.pm
===================================================================
--- lib/Apache/Scoreboard.pm	(revision 187)
+++ lib/Apache/Scoreboard.pm	(working copy)
@@@@ -1,6 +1,6 @@@@
 package Apache::Scoreboard;
 
-$Apache::Scoreboard::VERSION = '2.06';
+$Apache::Scoreboard::VERSION = '2.07';
 
 use strict;
 use warnings FATAL => 'all';
@@@@ -8,7 +8,7 @@@@
 use Carp;
 
 BEGIN {
-    require mod_perl;
+    require mod_perl2;
     die "This module was built against mod_perl 2.0 ",
         "and can't be used with $mod_perl::VERSION, "
             unless $mod_perl::VERSION > 1.98;
@@@@ -31,6 +31,8 @@@@
 sub http_fetch {
     my($self, $url) = @@_;
 
+    Carp::croak("no url argument was passed") unless $url;
+
     require LWP::UserAgent;
     unless ($ua) {
 	no strict 'vars';
Index: Makefile.PL
===================================================================
--- Makefile.PL	(revision 187)
+++ Makefile.PL	(working copy)
@@@@ -3,8 +3,7 @@@@
 use warnings FATAL => 'all';
 #no warnings 'redefine';
 
-use Apache2;
-use mod_perl 1.99;
+use mod_perl2;
 
 # XXX: need to check that the same perl is used as the one mod_perl
 # was built with, otherwise unresolved symbols problems occur:
@@@@ -22,7 +21,7 @@@@
 # prerequisites
 my %require = (
     "Apache::Test" => "1.10", # ipv6 fixes
-    "mod_perl"     => "1.9917",
+    "mod_perl"     => "2.00",
 );
 
 my @@scripts = qw(t/TEST);
@@@@ -31,13 +30,18 @@@@
d23 2
a24 83
Index: Changes
===================================================================
--- Changes	(revision 187)
+++ Changes	(working copy)
@@@@ -1,3 +1,9 @@@@
+2.07 - dev
+
+Apache::Scoreboard::image() now does magic so that image(new APR::Pool) doesn't segfault    - Stas
+
+ported to modperl 2.0 API changes   - MJH
+
 2.06 - Fri Mar 18 13:50:49 EST 2005
 
 fix the buggy reconstruction of the fetched binary image in thaw()
Index: Scoreboard.xs
===================================================================
--- Scoreboard.xs	(revision 187)
+++ Scoreboard.xs	(working copy)
@@@@ -2,6 +2,7 @@@@
 #include "mod_perl.h"
 #include "modperl_xs_sv_convert.h"
 #include "modperl_xs_typedefs.h"
+#include "modperl_xs_util.h"
 
 #include "scoreboard.h"
 
@@@@ -210,7 +211,7 @@@@
 
 int
 scoreboard_send(r)
-    Apache::RequestRec r
+    Apache2::RequestRec r
 
 
 SV *
@@@@ -323,26 +324,33 @@@@
     OUTPUT:
     RETVAL
 
-Apache::Scoreboard
-image(CLASS, pool)
+
+SV *
+image(CLASS, pool_sv)
     SV *CLASS
-    APR::Pool pool
+    SV *pool_sv
     
-    
+    INIT:
+    modperl_scoreboard_t *image;
+    apr_pool_t *pool = mp_xs_sv2_APR__Pool(pool_sv);
+
     CODE:
     image_sanity_check(aTHX);
 
-    RETVAL = (modperl_scoreboard_t *)apr_palloc(pool, sizeof(*RETVAL));
-    
+    image = (modperl_scoreboard_t *)apr_palloc(pool, sizeof(*image));
+
     if (ap_exists_scoreboard_image()) {
-        RETVAL->sb   = ap_scoreboard_image;
-        RETVAL->pool = pool;
-        ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &(RETVAL->server_limit));
-        ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &(RETVAL->thread_limit));
+        image->sb   = ap_scoreboard_image;
+        image->pool = pool;
+        ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &(image->server_limit));
+        ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &(image->thread_limit));
     }
     else {
         Perl_croak(aTHX_ "ap_scoreboard_image doesn't exist");
     }
+    RETVAL = sv_setref_pv(NEWSV(0, 0), "Apache::Scoreboard", (void*)image);
+    /* make sure the pool sticks around as long as this object is alive */
+    mpxs_add_pool_magic(RETVAL, pool_sv);
 
     CLASS = CLASS; /* avoid warnings */
 
Index: Dummy/Makefile.PL
===================================================================
--- Dummy/Makefile.PL	(revision 220)
+++ Dummy/Makefile.PL	(working copy)
@

