cvs commit: modperl-2.0/todo missing_old_features.txt

2001-12-13 Thread stas

stas01/12/13 18:07:30

  Modified:todo missing_old_features.txt
  Log:
  - need to port Apache::__T flag
  
  Revision  ChangesPath
  1.16  +4 -0  modperl-2.0/todo/missing_old_features.txt
  
  Index: missing_old_features.txt
  ===
  RCS file: /home/cvs/modperl-2.0/todo/missing_old_features.txt,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- missing_old_features.txt  2001/11/19 00:07:28 1.15
  +++ missing_old_features.txt  2001/12/14 02:07:30 1.16
  @@ -33,6 +33,10 @@
   
   - ... others ...
   
  +- Apache::__T flag which tells whether we run under -T (in 5.8.0 can check
  +  ${^TAINT})
  +
  +
   core modules:
   
   
  
  
  



cvs commit: modperl-2.0/lib/ModPerl WrapXS.pm

2001-12-13 Thread stas

stas01/12/13 20:10:20

  Modified:lib/ModPerl WrapXS.pm
  Log:
  - don't cache the autogeneration warning  (it's not the same because of
  the generation trace)
  
  Revision  ChangesPath
  1.37  +9 -12 modperl-2.0/lib/ModPerl/WrapXS.pm
  
  Index: WrapXS.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/WrapXS.pm,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- WrapXS.pm 2001/11/28 17:05:56 1.36
  +++ WrapXS.pm 2001/12/14 04:10:20 1.37
  @@ -26,12 +26,6 @@
  glue_dirs = [xs_glue_dirs()],
   }, $class;
   
  -for (qw(c hash)) {
  -my $w = noedit_warning_$_;
  -my $method = ModPerl::Code::$w;
  -$self-{$w} = $self-$method();
  -}
  -
   $self-typemap-get;
   $self;
   }
  @@ -298,8 +292,10 @@
   local $Data::Dumper::Terse = 1;
   $deps = Dumper $deps;
   
  +my $noedit_warning = $self-ModPerl::Code::noedit_warning_hash();
  +
   print $fh EOF;
  -$self-{noedit_warning_hash}
  +$noedit_warning
   
   use lib qw(../../../lib); #for Apache::BuildConfig
   use ModPerl::MM ();
  @@ -412,8 +408,8 @@
   my($self, $module, $functions) = @_;
   
   my $fh = $self-open_class_file($module, '.xs');
  -print $fh $self-{noedit_warning_c}\n,
  -  \n#define MP_IN_XS\n\n;
  +print $fh $self-ModPerl::Code::noedit_warning_c(), \n;
  +print $fh \n#define MP_IN_XS\n\n;
   
   my @includes = @{ $self-includes };
   
  @@ -493,9 +489,10 @@
   my $loader = join '::', $base, 'XSLoader';
   
   my $fh = $self-open_class_file($module, '.pm');
  +my $noedit_warning = $self-ModPerl::Code::noedit_warning_hash();
   
   print $fh EOF;
  -$self-{noedit_warning_hash}
  +$noedit_warning
   
   package $module;
   $isa
  @@ -523,7 +520,7 @@
   my %seen;
   
   my $fh = $self-open_class_file('ModPerl::WrapXS', 'typemap');
  -print $fh $self-{noedit_warning_hash}\n;
  +print $fh $self-ModPerl::Code::noedit_warning_hash(), \n;
   
   while (my($type, $class) = each %$map) {
   $class ||= $type;
  @@ -550,7 +547,7 @@
   my $file = join '/', $self-{XS_DIR}, $h;
   
   open my $fh, '', $file or die open $file: $!;
  -print $fh $self-{noedit_warning_c}\n;
  +print $fh $self-ModPerl::Code::noedit_warning_c(), \n;
   print $fh $code;
   close $fh;
   }
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_util.c modperl_util.h

2001-12-13 Thread stas

stas01/12/13 20:35:28

  Modified:src/modules/perl modperl_util.c modperl_util.h
  Log:
  - porting modperl_perl_gensym from 1.x
  
  Revision  ChangesPath
  1.32  +10 -0 modperl-2.0/src/modules/perl/modperl_util.c
  
  Index: modperl_util.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- modperl_util.c2001/11/19 23:24:46 1.31
  +++ modperl_util.c2001/12/14 04:35:28 1.32
  @@ -572,3 +572,13 @@
   {
   return gv_stashpv(name, FALSE) ? 1 : 0;
   }
  +
  +/* same as Symbol::gensym() */
  +SV *modperl_perl_gensym(pTHX_ char *pack)
  +{
  +GV *gv = newGVgen(pack);
  +SV *rv = newRV((SV*)gv);
  +(void)hv_delete(gv_stashpv(pack, TRUE), 
  +GvNAME(gv), GvNAMELEN(gv), G_DISCARD);
  +return rv;
  +}
  
  
  
  1.31  +2 -0  modperl-2.0/src/modules/perl/modperl_util.h
  
  Index: modperl_util.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.h,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- modperl_util.h2001/11/06 18:39:41 1.30
  +++ modperl_util.h2001/12/14 04:35:28 1.31
  @@ -112,4 +112,6 @@
   
   MP_INLINE int modperl_perl_module_loaded(pTHX_ const char *name);
   
  +SV *modperl_perl_gensym(pTHX_ char *pack);
  +
   #endif /* MODPERL_UTIL_H */
  
  
  



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

2001-12-13 Thread stas

stas01/12/13 20:52:46

  Modified:todo api.txt
   lib/Apache compat.pm
   t/apache compat.t
   t/response/TestApache compat.pm
  Log:
  - Apache-gensym now lives in compat.pm
  
  Revision  ChangesPath
  1.17  +0 -3  modperl-2.0/todo/api.txt
  
  Index: api.txt
  ===
  RCS file: /home/cvs/modperl-2.0/todo/api.txt,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- api.txt   2001/11/13 17:42:49 1.16
  +++ api.txt   2001/12/14 04:52:45 1.17
  @@ -90,9 +90,6 @@
   $r-cgi_header_out:
   anything in 1.x land actually using it?
   
  -Apache-gensym:
  - Apache::compat ?
  -
   $r-post_connection:
   alias not implemented
   
  
  
  
  1.31  +5 -0  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.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- compat.pm 2001/12/10 08:28:22 1.30
  +++ compat.pm 2001/12/14 04:52:45 1.31
  @@ -26,6 +26,7 @@
   use APR::Table ();
   use APR::Pool ();
   use mod_perl ();
  +use Symbol ();
   
   BEGIN {
   $INC{'Apache.pm'} = __FILE__;
  @@ -64,6 +65,10 @@
   sub module {
   require Apache::Module;
   return Apache::Module::loaded($_[1]);
  +}
  +
  +sub gensym {
  +return Symbol::gensym();
   }
   
   package Apache::Constants;
  
  
  
  1.8   +8 -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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- compat.t  2001/12/10 04:32:40 1.7
  +++ compat.t  2001/12/14 04:52:45 1.8
  @@ -6,7 +6,7 @@
   use Apache::TestUtil;
   use Apache::TestRequest;
   
  -plan tests = 30, todo = [24, 27, 29], \have_lwp;
  +plan tests = 31, todo = [25, 28, 30], \have_lwp;
   
   my $location = /TestApache::compat;
   
  @@ -38,6 +38,13 @@
   GET_BODY(query(@data)),
   q{$r-Apache::args}
   );
  +}
  +
  +# Apache-gensym
  +{
  +my @data = (test = 'gensym');
  +my $data = GET_BODY query(@data) || '';
  +ok_nok($data);
   }
   
   # header_in
  
  
  
  1.8   +6 -1  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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- compat.pm 2001/12/10 08:31:15 1.7
  +++ compat.pm 2001/12/14 04:52:45 1.8
  @@ -14,6 +14,7 @@
   
   sub handler {
   my $r = shift;
  +$gr = $r;
   
   $r-send_http_header('text/plain');
   
  @@ -33,6 +34,11 @@
   if ($data{test} eq 'content' || $data{test} eq 'args') {
   $r-print(test $data{test});
   }
  +elsif ($data{test} eq 'gensym') {
  +debug Apache-gensym;
  +my $fh = Apache-gensym;
  +ok ref $fh eq 'GLOB';
  +}
   elsif ($data{test} eq 'header') {
   my $way  = $data{way};
   my $sub  = header_$way;
  @@ -78,7 +84,6 @@
   }
   }
   elsif ($data{test} eq 'Apache::File') {
  -$gr = $r;
   my $file = $vars-{t_conf_file};
   
   debug new Apache::File file object;
  
  
  



cvs commit: modperl-2.0/lib/ModPerl WrapXS.pm

2001-12-13 Thread stas

stas01/12/13 21:12:13

  Modified:lib/ModPerl WrapXS.pm
  Log:
  s/catfile/catdir/ when working with dirs
  Submitted by: Barrie Slaymaker [EMAIL PROTECTED]
  Reviewed by:  stas
  
  Revision  ChangesPath
  1.39  +3 -3  modperl-2.0/lib/ModPerl/WrapXS.pm
  
  Index: WrapXS.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/WrapXS.pm,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- WrapXS.pm 2001/12/14 04:51:55 1.38
  +++ WrapXS.pm 2001/12/14 05:12:13 1.39
  @@ -11,7 +11,7 @@
   use File::Path qw(rmtree mkpath);
   use Cwd qw(fastcwd);
   use Data::Dumper;
  -use File::Spec::Functions qw(catfile);
  +use File::Spec::Functions qw(catfile catdir);
   
   our $VERSION = '0.01';
   
  @@ -221,7 +221,7 @@
   sub prepare {
   my $self = shift;
   $self-{DIR} = 'WrapXS';
  -$self-{XS_DIR} = catfile fastcwd(), 'xs';
  +$self-{XS_DIR} = catdir fastcwd(), 'xs';
   
   if (-e $self-{DIR}) {
   rmtree([$self-{DIR}], 1, 1);
  @@ -243,7 +243,7 @@
   
   my $dirname = $self-class_dirname($class);
   my $dir = ($dirname =~ m:/: and $dirname !~ m:^$self-{DIR}:) ?
  -  catfile($self-{DIR}, $dirname) : $dirname;
  +  catdir($self-{DIR}, $dirname) : $dirname;
   
   mkpath [$dir], 1, 0755 unless -d $dir;