Randy Kobes wrote:
As Stas mentioned before, it'd be useful to have APR in the APR::* modules loaded automatically - the following diff puts a 'use APR ()' in the APR::* pm files:
+1, thanks Randy!
Randy, et al, please don't forget to update Changes when you commit things that have an importance for users. e.g. this autoload of APR is an important change that's worth of users' attention. Thanks.
=========================================================== Index: lib/ModPerl/WrapXS.pm =================================================================== RCS file: /home/cvs/modperl-2.0/lib/ModPerl/WrapXS.pm,v retrieving revision 1.74 diff -u -r1.74 WrapXS.pm --- lib/ModPerl/WrapXS.pm 28 May 2004 01:35:15 -0000 1.74 +++ lib/ModPerl/WrapXS.pm 21 Jun 2004 06:33:55 -0000 @@ -572,6 +572,7 @@
my $fh = $self->open_class_file($module, '.pm'); my $noedit_warning = $self->ModPerl::Code::noedit_warning_hash(); + my $use_apr = ($module =~ /^APR::\w+$/) ? 'use APR ();' : '';
print $fh <<EOF; $noedit_warning @@ -582,6 +583,7 @@ use warnings FATAL => 'all';
$isa +$use_apr use $loader (); our \$VERSION = '0.01'; $loader\::load __PACKAGE__; Index: xs/APR/Const/Const.pm =================================================================== RCS file: /home/cvs/modperl-2.0/xs/APR/Const/Const.pm,v retrieving revision 1.2 diff -u -r1.2 Const.pm --- xs/APR/Const/Const.pm 4 Mar 2004 06:01:09 -0000 1.2 +++ xs/APR/Const/Const.pm 21 Jun 2004 06:33:55 -0000 @@ -15,6 +15,7 @@ package APR::Const;
use ModPerl::Const (); +use APR (); use XSLoader ();
our $VERSION = '0.01';
Index: xs/APR/PerlIO/PerlIO.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/APR/PerlIO/PerlIO.pm,v
retrieving revision 1.4
diff -u -r1.4 PerlIO.pm
--- xs/APR/PerlIO/PerlIO.pm 4 Mar 2004 06:01:10 -0000 1.4
+++ xs/APR/PerlIO/PerlIO.pm 21 Jun 2004 06:33:55 -0000
@@ -22,6 +22,7 @@
use Config;
use constant PERLIO_LAYERS_ARE_ENABLED => $Config{useperlio} && $] >= 5.00703;
+use APR (); use APR::XSLoader (); APR::XSLoader::load __PACKAGE__;
=============================================================
-- __________________________________________________________________ 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
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
