cvs commit: modperl-2.0/t/response/TestApache compat.pm

2001-12-05 Thread stas

stas01/12/05 08:03:25

  Modified:lib/Apache compat.pm
   t/apache compat.t
   t/response/TestApache compat.pm
  Log:
  - add 'PerlOptions +GlobalRequest' to avoid core dumps in tests
  - warn user if Apache-request fails
  - add the returned by tmpfile filename test
  
  Revision  ChangesPath
  1.26  +4 -1  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- compat.pm 2001/12/05 05:31:09 1.25
  +++ compat.pm 2001/12/05 16:03:25 1.26
  @@ -301,11 +301,14 @@
   my $class = shift;
   my $limit = 100;
   my $r = Apache-request;
  +unless ($r) {
  +die 'PerlOptions +GlobalRequest' setting is required;
  +}
   while ($limit--) {
   my $tmpfile = $TMPDIR/${$} . $TMPNAM++;
   my $fh = $class-new;
   sysopen($fh, $tmpfile, $Mode, $Perms);
  -$r-register_cleanup(sub { unlink $tmpfile }) if $r;
  +$r-pool-cleanup_register(sub { unlink $tmpfile }) if $r;
   if ($fh) {
return wantarray ? ($tmpfile, $fh) : $fh;
}
  
  
  
  1.5   +1 -1  modperl-2.0/t/apache/compat.t
  
  Index: compat.t
  ===
  RCS file: /home/cvs/modperl-2.0/t/apache/compat.t,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- compat.t  2001/12/05 05:31:09 1.4
  +++ compat.t  2001/12/05 16:03:25 1.5
  @@ -6,7 +6,7 @@
   use Apache::TestUtil;
   use Apache::TestRequest;
   
  -plan tests = 20, \have_lwp;
  +plan tests = 21, \have_lwp;
   
   my $location = /TestApache::compat;
   
  
  
  
  1.4   +10 -2 modperl-2.0/t/response/TestApache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- compat.pm 2001/12/05 05:31:09 1.3
  +++ compat.pm 2001/12/05 16:03:25 1.4
  @@ -116,9 +116,15 @@
   debug new+open non-exists;
   ok !Apache::File-new($file.yeahright);
   
  -debug open tmpfile;
  -ok my ($tmpfile, $tmpfh) = Apache::File-tmpfile;
  +# tmpfile
  +my ($tmpfile, $tmpfh) = Apache::File-tmpfile;
  +#89573612
  +debug open tmpfile fh;
  +ok $tmpfh;
   
  +debug open tmpfile name;
  +ok $tmpfile;
  +
   debug write/read from tmpfile;
   my $write = test $$;
   print $tmpfh $write;
  @@ -134,3 +140,5 @@
   sub debug { $gr-print(# $_\n) for @_; }
   
   1;
  +__END__
  +PerlOptions +GlobalRequest
  
  
  



cvs commit: modperl-site/embperl Changes.pod.1.html Changes.pod.2.html Changes.pod.cont.html Embperl.pod.14.html Embperl.pod.2.html Embperl.pod.3.html Embperl.pod.6.html Embperl.pod.7.html Embperl.pod.cont.html Faq.pod.1.html INSTALL.pod.1.html Recordset.pod.2.html index.html

2001-12-05 Thread richter

richter 01/12/05 00:16:25

  Modified:embperl  Changes.pod.1.html Changes.pod.2.html
Changes.pod.cont.html Embperl.pod.14.html
Embperl.pod.2.html Embperl.pod.3.html
Embperl.pod.6.html Embperl.pod.7.html
Embperl.pod.cont.html Faq.pod.1.html
INSTALL.pod.1.html Recordset.pod.2.html index.html
  Log:
  Embperl Webpages - Changes
  
  Revision  ChangesPath
  1.229 +6 -10 modperl-site/embperl/Changes.pod.1.html
  
  Index: Changes.pod.1.html
  ===
  RCS file: /home/cvs/modperl-site/embperl/Changes.pod.1.html,v
  retrieving revision 1.228
  retrieving revision 1.229
  diff -u -r1.228 -r1.229
  --- Changes.pod.1.html2001/11/02 10:16:23 1.228
  +++ Changes.pod.1.html2001/12/05 08:16:25 1.229
  @@ -1,6 +1,6 @@
   HTML
   HEAD
  -TITLE1.3.4_dev -- That's what currently under developement/TITLE
  +TITLE1.3.4   5. Dec 2001/TITLE
   LINK REV=made HREF=mailto:[EMAIL PROTECTED];
   /HEAD
   
  @@ -11,7 +11,7 @@
   tr
   td valign=bottom align=center
   font size=6strong
  -A NAME=1_3_4_dev_That_s_what_current1.3.4_dev -- That's what currently under 
developement/a/strong/font
  +A NAME=1_3_4_RELEASE_5_Dec_20011.3.4 (RELEASE)   5. Dec 2001/a/strong/font
   
   /tdtd rowspan=2 align=right/td
   /trtrtd  valign=top  align=center
  @@ -21,14 +21,6 @@
   
   [a href= HOME/a]nbsp;nbsp; [a 
href=Changes.pod.cont.htmlCONTENT/a]nbsp;nbsp; [a 
href=Changes.pod.cont.htmlPREV (Revision History - Content)/a]nbsp;nbsp; [a 
href=Changes.pod.2.htmlNEXT (1.3.3 (RELEASE)   6. Juni 2001)/a]nbsp;nbsp; 
brhr
   P
  -Last Update: Fri Nov 2 11:26:22 2001 (MET)
  -
  -P
  -NOTE: This version is only available via A HREF=CVS.pod.1.html#INTRO CVS/A
  -
  -
  -
  -P
   PRE   - Added method $r -gt; Espace for html amp; url escaping
  - URL escpage # to %23
  - use Content-Lenght HTTP Header instead of $ENV{CONTENT_LENGTH}
  @@ -69,6 +61,10 @@
  - Added optShowBacktrace to enable backtrace of filename in error messages
  - Removed obsolete debug flags dbgDisableCache, dbgWatchScalar,
dbgEarlyHttpHeader
  +   - Fixed problem with changeing to page directory on win32. Reported by
  + Hans de Groot.
  +   - Fixed problems with mod_perl environement handling with ActiveState Perl 
  + on win32.
   /PRE
   p[a href= HOME/a]nbsp;nbsp; [a 
href=Changes.pod.cont.htmlCONTENT/a]nbsp;nbsp; [a 
href=Changes.pod.cont.htmlPREV (Revision History - Content)/a]nbsp;nbsp; [a 
href=Changes.pod.2.htmlNEXT (1.3.3 (RELEASE)   6. Juni 2001)/a]nbsp;nbsp; br
   font 
color=#808080___br
  
  
  
  1.64  +2 -2  modperl-site/embperl/Changes.pod.2.html
  
  Index: Changes.pod.2.html
  ===
  RCS file: /home/cvs/modperl-site/embperl/Changes.pod.2.html,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- Changes.pod.2.html2001/06/15 06:29:22 1.63
  +++ Changes.pod.2.html2001/12/05 08:16:25 1.64
  @@ -19,7 +19,7 @@
   img src=line.jpg alt= WIDTH=732 HEIGHT=35 
   nbsp;nbsp;nbsp;nbsp;/td/tr/table
   
  -[a href= HOME/a]nbsp;nbsp; [a 
href=Changes.pod.cont.htmlCONTENT/a]nbsp;nbsp; [a 
href=Changes.pod.1.htmlPREV (1.3.4_dev -- That's what currently under 
developement)/a]nbsp;nbsp; [a href=Changes.pod.3.htmlNEXT (1.3.2 (RELEASE)   
16 May. 2001 )/a]nbsp;nbsp; brhr
  +[a href= HOME/a]nbsp;nbsp; [a 
href=Changes.pod.cont.htmlCONTENT/a]nbsp;nbsp; [a 
href=Changes.pod.1.htmlPREV (1.3.4 (RELEASE)   5. Dec 2001)/a]nbsp;nbsp; [a 
href=Changes.pod.3.htmlNEXT (1.3.2 (RELEASE)   16 May. 2001 )/a]nbsp;nbsp; 
brhr
   P
   PRE   - fixes problem with cleanup and Perl 5.6.0+ which broke
session management. Spotted by Lukas Zapletal and Andy Lim.
  @@ -39,7 +39,7 @@
  - added correct errror message for rcNotCompiledForModPerl.
Spotted by Scott Chapman.
   /PRE
  -p[a href= HOME/a]nbsp;nbsp; [a 
href=Changes.pod.cont.htmlCONTENT/a]nbsp;nbsp; [a 
href=Changes.pod.1.htmlPREV (1.3.4_dev -- That's what currently under 
developement)/a]nbsp;nbsp; [a href=Changes.pod.3.htmlNEXT (1.3.2 (RELEASE)   
16 May. 2001 )/a]nbsp;nbsp; br
  +p[a href= HOME/a]nbsp;nbsp; [a 
href=Changes.pod.cont.htmlCONTENT/a]nbsp;nbsp; [a 
href=Changes.pod.1.htmlPREV (1.3.4 (RELEASE)   5. Dec 2001)/a]nbsp;nbsp; [a 
href=Changes.pod.3.htmlNEXT (1.3.2 (RELEASE)   16 May. 2001 )/a]nbsp;nbsp; br
   font 
color=#808080___br
   HTML::Embperl - Copyright (c) 1997-2001 Gerald Richter / a 
href=http://www.ecos.de/;ecos gmbh/a
   /font/p
  
  
  
  1.64  +3 -3  modperl-site/embperl/Changes.pod.cont.html
  
  Index: Changes.pod.cont.html
  

cvs commit: modperl-2.0/t/response/TestApache compat.pm

2001-12-05 Thread stas

stas01/12/05 08:39:01

  Modified:t/apache compat.t
   t/response/TestApache compat.pm
  Log:
  - add the rest of the sub tests for the $r methods provided by
  Apache::File in 1.x.
  
  Revision  ChangesPath
  1.6   +3 -3  modperl-2.0/t/apache/compat.t
  
  Index: compat.t
  ===
  RCS file: /home/cvs/modperl-2.0/t/apache/compat.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- compat.t  2001/12/05 16:03:25 1.5
  +++ compat.t  2001/12/05 16:39:01 1.6
  @@ -6,7 +6,7 @@
   use Apache::TestUtil;
   use Apache::TestRequest;
   
  -plan tests = 21, \have_lwp;
  +plan tests = 26, \have_lwp;
   
   my $location = /TestApache::compat;
   
  @@ -54,7 +54,7 @@
   
   # Apache::File
   {
  -my @data = (test = 'file');
  +my @data = (test = 'Apache::File');
   my $data = GET_BODY query(@data) || '';
   ok_nok($data);
   }
  @@ -66,7 +66,7 @@
   $location? . join '', map { $_=$args{$_} } keys %args;
   }
   
  -sub t_header{
  +sub t_header {
   my ($way, $what, $comment) = @_;
   ok t_cmp(
   ok,
  
  
  
  1.5   +25 -3 modperl-2.0/t/response/TestApache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- compat.pm 2001/12/05 16:03:25 1.4
  +++ compat.pm 2001/12/05 16:39:01 1.5
  @@ -77,7 +77,7 @@
   $r-print(t_is_equal($exp, $got) ? 'ok' : 'nok');
   }
   }
  -elsif ($data{test} eq 'file') {
  +elsif ($data{test} eq 'Apache::File') {
   $gr = $r;
   my $file = $vars-{t_conf_file};
   
  @@ -118,7 +118,7 @@
   
   # tmpfile
   my ($tmpfile, $tmpfh) = Apache::File-tmpfile;
  -#89573612
  +
   debug open tmpfile fh;
   ok $tmpfh;
   
  @@ -131,9 +131,31 @@
   seek $tmpfh, 0, 0;
   my $read = $tmpfh;
   ok $read eq $write;
  +
  +debug \$r-discard_request_body;
  +ok $r-discard_request_body == Apache::OK;
  +
  +debug \$r-meets_conditions;
  +ok $r-meets_conditions == Apache::OK;
  +
  +debug \$r-set_content_length;
  +$r-set_content_length(10);
  +my $cl_header = $r-headers_out-{Content-length} || '';
  +ok $cl_header == 10;
  +
  +# XXX: how to test etag?
  +debug \$r-set_etag;
  +$r-set_etag;
  +ok 1;
  +
  +debug \$r-update_mtime/\$r-mtime;
  +my $time = time;
  +$r-update_mtime($time);
  +ok $r-mtime == $time;
  +
   }
   
  -OK;
  +Apache::OK;
   }
   
   sub ok{ $gr-print($_[0] ? ok\n : nok\n); }
  
  
  



Re: http://perl.apache.org/tidbits.html

2001-12-05 Thread dougm

On Sun, 28 Oct 2001, Paul DuBois wrote:

 I don't know if you're still maintaing the list of publications
 that mention mod_perl...looks like maybe not, given the dates on
 the items.  But if you are, this book (by me) has a chapter on
 mod_perl in the context of using MySQL/DBI/Apache:
 
 http://www.kitebird.com/mysql-perl/

hi paul, thanks for the info.  i haven't been maintaining that page, and a
new site is under construction.  i'm not sure if that info will be carried
over or not, but i've cc'd the list.  would be interesting to see that
page brought up to date.




cvs commit: modperl-2.0/lib/Apache compat.pm

2001-12-05 Thread dougm

dougm   01/12/05 11:09:37

  Modified:lib/Apache compat.pm
  Log:
  more info in Apache::File-tmpfile if Apache-request isn't available
  
  Revision  ChangesPath
  1.27  +3 -2  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- compat.pm 2001/12/05 16:03:25 1.26
  +++ compat.pm 2001/12/05 19:09:37 1.27
  @@ -302,13 +302,14 @@
   my $limit = 100;
   my $r = Apache-request;
   unless ($r) {
  -die 'PerlOptions +GlobalRequest' setting is required;
  +die cannot use Apache::File-tmpfile .
  +  without 'SetHandler perl-script' or 'PerlOptions +GlobalRequest';
   }
   while ($limit--) {
   my $tmpfile = $TMPDIR/${$} . $TMPNAM++;
   my $fh = $class-new;
   sysopen($fh, $tmpfile, $Mode, $Perms);
  -$r-pool-cleanup_register(sub { unlink $tmpfile }) if $r;
  +$r-pool-cleanup_register(sub { unlink $tmpfile });
   if ($fh) {
return wantarray ? ($tmpfile, $fh) : $fh;
}
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2001-12-05 Thread dougm

dougm   01/12/05 11:11:34

  Modified:lib/Apache compat.pm
  Log:
  some whitespace style nits
  remove redundant use of Apache::{Response,RequestRec}
  
  Revision  ChangesPath
  1.28  +4 -3  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- compat.pm 2001/12/05 19:09:37 1.27
  +++ compat.pm 2001/12/05 19:11:34 1.28
  @@ -290,7 +290,6 @@
   close $self;
   }
   
  -
   my $TMPNAM = 'aa';
   my $TMPDIR = $ENV{'TMPDIR'} || $ENV{'TEMP'} || '/tmp';
   ($TMPDIR) = $TMPDIR =~ /^([^|;*]+)$/; #untaint
  @@ -301,15 +300,19 @@
   my $class = shift;
   my $limit = 100;
   my $r = Apache-request;
  +
   unless ($r) {
   die cannot use Apache::File-tmpfile .
 without 'SetHandler perl-script' or 'PerlOptions +GlobalRequest';
   }
  +
   while ($limit--) {
   my $tmpfile = $TMPDIR/${$} . $TMPNAM++;
   my $fh = $class-new;
  +
   sysopen($fh, $tmpfile, $Mode, $Perms);
   $r-pool-cleanup_register(sub { unlink $tmpfile });
  +
   if ($fh) {
return wantarray ? ($tmpfile, $fh) : $fh;
}
  @@ -317,7 +320,6 @@
   }
   
   # the following functions now live in Apache::Response
  -use Apache::Response;
   # * discard_request_body
   # * meets_conditions
   # * set_content_length
  @@ -326,7 +328,6 @@
   # * update_mtime
   
   # the following functions now live in Apache::RequestRec
  -use Apache::RequestRec;
   # * mtime
   
   
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2001-12-05 Thread dougm

dougm   01/12/05 11:18:08

  Modified:lib/Apache compat.pm
  Log:
  untabify and better fit for tmpfile error message
  
  Revision  ChangesPath
  1.29  +5 -4  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- compat.pm 2001/12/05 19:11:34 1.28
  +++ compat.pm 2001/12/05 19:18:08 1.29
  @@ -302,8 +302,9 @@
   my $r = Apache-request;
   
   unless ($r) {
  -die cannot use Apache::File-tmpfile .
  -  without 'SetHandler perl-script' or 'PerlOptions +GlobalRequest';
  +die cannot use Apache::File-tmpfile ,
  +without 'SetHandler perl-script' ,
  +or 'PerlOptions +GlobalRequest';
   }
   
   while ($limit--) {
  @@ -314,8 +315,8 @@
   $r-pool-cleanup_register(sub { unlink $tmpfile });
   
   if ($fh) {
  - return wantarray ? ($tmpfile, $fh) : $fh;
  - }
  +return wantarray ? ($tmpfile, $fh) : $fh;
  +}
   }
   }
   
  
  
  



cvs commit: modperl-2.0/t/filter/TestFilter api.pm

2001-12-05 Thread dougm

dougm   01/12/05 11:57:29

  Modified:t/filter/TestFilter api.pm
  Log:
  s/use Test/use Apache::Test/
  
  Revision  ChangesPath
  1.5   +3 -13 modperl-2.0/t/filter/TestFilter/api.pm
  
  Index: api.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/api.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- api.pm2001/06/23 17:47:31 1.4
  +++ api.pm2001/12/05 19:57:29 1.5
  @@ -6,20 +6,10 @@
   use Apache::Filter ();
   use Apache::FilterRec ();
   
  -use Test;
  +use Apache::Test;
   
   my $response_data = blah blah blah;
   
  -sub init_test_pm {
  -my $filter = shift;
  -
  -tie *STDOUT, $filter;
  -
  -$Test::TESTOUT = \*STDOUT;
  -$Test::planned = 0;
  -$Test::ntest = 1;
  -}
  -
   #XXX: else pp_untie complains:
   #untie attempted while %d inner references still exist
   sub Apache::Filter::UNTIE {}
  @@ -29,7 +19,7 @@
   
   $filter-read(my $buffer); #slurp everything;
   
  -init_test_pm($filter);
  +tie *STDOUT, $filter;
   
   plan tests = 6;
   
  @@ -51,7 +41,7 @@
   
   untie *STDOUT;
   
  -0;
  +Apache::OK;
   }
   
   sub response {
  
  
  



cvs commit: modperl-site index.html

2001-12-05 Thread stas

stas01/12/05 19:58:27

  Modified:.index.html
  Log:
  - add a ref to the mod_perl Developer's Cookbook
  
  Revision  ChangesPath
  1.94  +7 -0  modperl-site/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/modperl-site/index.html,v
  retrieving revision 1.93
  retrieving revision 1.94
  diff -u -r1.93 -r1.94
  --- index.html2001/10/31 14:37:54 1.93
  +++ index.html2001/12/06 03:58:27 1.94
  @@ -310,6 +310,13 @@
brbr
/li 
   
  + li 
  +   a href=http://www.modperlcookbook.org/;The mod_perl
  +   Developer's Cookbook/a book by Geoffrey Young, Paul
  +   Lindner and Randy Kobes.
  + brbr
  + /li 
  +
   li 
 a href=http://www.oreilly.com/catalog/modperlpr/;mod_perl
  Pocket Reference/a book by Andrew Ford