cvs commit: modperl-2.0/xs/maps apache_functions.map apr_functions.map

2002-05-19 Thread dougm

dougm   02/05/19 16:59:52

  Modified:xs/maps  apache_functions.map apr_functions.map
  Log:
  misc api mapping changes:
  - swap internal_fast_redirect, ap_die args
  - alias sub_req_lookup_dirent to lookup_dirent, reorder/default args
  - disable ap_run_child_init, apr_gethostname, apr_base64_decode_len
  
  Revision  ChangesPath
  1.52  +4 -4  modperl-2.0/xs/maps/apache_functions.map
  
  Index: apache_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apache_functions.map,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- apache_functions.map  19 May 2002 20:11:55 -  1.51
  +++ apache_functions.map  19 May 2002 23:59:52 -  1.52
  @@ -81,8 +81,8 @@
   -ap_finalize_sub_req_protocol
ap_internal_redirect | | r, new_uri
ap_internal_redirect_handler | | r, new_uri
  - ap_internal_fast_redirect
  - ap_sub_req_lookup_dirent
  + ap_internal_fast_redirect| | r, sub_req
  + ap_sub_req_lookup_dirent | | r, finfo, subtype=AP_SUBREQ_NO_ARGS, 
next_filter=NULL | lookup_dirent
   
   subrequest_rec *:ap_sub_req_lookup_file | | \
r, new_file, next_filter=r->output_filters->next | lookup_file
  @@ -436,7 +436,7 @@
   >ap_run_open_logs
   >ap_run_post_config
   >ap_run_insert_filter
  - ap_run_child_init
  +>ap_run_child_init
   ?ap_run_default_port
   ?ap_run_http_method
   >ap_run_create_connection
  @@ -460,7 +460,7 @@
   >ap_run_pre_mpm
   !ap_run_quick_handler
ap_invoke_handler
  - ap_die
  + ap_die | | r, type
   
   !MODULE=Apache::MD5
ap_md5
  
  
  
  1.40  +2 -2  modperl-2.0/xs/maps/apr_functions.map
  
  Index: apr_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_functions.map,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- apr_functions.map 19 May 2002 01:05:30 -  1.39
  +++ apr_functions.map 19 May 2002 23:59:52 -  1.40
  @@ -489,7 +489,7 @@
apr_current_userid
   
   MODULE=APR::NetLib
  - apr_gethostname
  +-apr_gethostname
apr_getnameinfo
   -apr_getservbyname
apr_parse_addr_port
  @@ -551,7 +551,7 @@
apr_base64_decode | MPXS_ | coded_src
apr_base64_encode | MPXS_ | plain_src
apr_base64_encode_len
  - apr_base64_decode_len
  +-apr_base64_decode_len
   -apr_base64_encode_binary
   -apr_base64_decode_binary
   
  
  
  



cvs commit: modperl-2.0/xs/Apache/Response Apache__Response.h

2002-05-19 Thread dougm

dougm   02/05/19 16:01:12

  Modified:xs/Apache/Response Apache__Response.h
  Log:
  use ap_set_content_type rather than directly setting r->content_type
  in $r->send_http_header
  
  Revision  ChangesPath
  1.7   +1 -1  modperl-2.0/xs/Apache/Response/Apache__Response.h
  
  Index: Apache__Response.h
  ===
  RCS file: /home/cvs/modperl-2.0/xs/Apache/Response/Apache__Response.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Apache__Response.h21 Jan 2002 08:27:30 -  1.6
  +++ Apache__Response.h19 May 2002 23:01:12 -  1.7
  @@ -20,7 +20,7 @@
   MP_dRCFG;
   
   if (type) {
  -r->content_type = apr_pstrdup(r->pool, type);
  +ap_set_content_type(r, apr_pstrdup(r->pool, type));
   }
   
   rcfg->wbucket->header_parse = 0; /* turn off PerlOptions +ParseHeaders */
  
  
  



cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm

2002-05-19 Thread dougm

dougm   02/05/19 13:11:56

  Modified:xs/maps  apache_functions.map apache_structures.map
modperl_functions.map
   xs/tables/current/ModPerl FunctionTable.pm
  Log:
  wrap $r->content_type("foo/bar") so ap_set_content_type is called underneath
  
  Revision  ChangesPath
  1.51  +1 -1  modperl-2.0/xs/maps/apache_functions.map
  
  Index: apache_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apache_functions.map,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- apache_functions.map  19 May 2002 01:05:30 -  1.50
  +++ apache_functions.map  19 May 2002 20:11:55 -  1.51
  @@ -49,7 +49,7 @@
   >ap_rgetline_core
   ?ap_get_request_note
   ?ap_register_request_note
  - ap_set_content_type
  +~ap_set_content_type
   
   #MODULE=Apache::RequestConfig
ap_document_root
  
  
  
  1.15  +1 -1  modperl-2.0/xs/maps/apache_structures.map
  
  Index: apache_structures.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apache_structures.map,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- apache_structures.map 19 May 2002 01:05:30 -  1.14
  +++ apache_structures.map 19 May 2002 20:11:55 -  1.15
  @@ -40,7 +40,7 @@
  err_headers_out
  subprocess_env
  notes
  -   content_type
  +~  content_type
  handler
  content_encoding
  content_languages
  
  
  
  1.37  +3 -0  modperl-2.0/xs/maps/modperl_functions.map
  
  Index: modperl_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/modperl_functions.map,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- modperl_functions.map 10 May 2002 17:48:27 -  1.36
  +++ modperl_functions.map 19 May 2002 20:11:55 -  1.37
  @@ -8,6 +8,9 @@
mpxs_ModPerl__Global_special_list_call
mpxs_ModPerl__Global_special_list_clear
   
  +MODULE=Apache::RequestRec   PACKAGE=Apache::RequestRec
  + mpxs_Apache__RequestRec_content_type | | r, type=Nullsv
  +
   MODULE=Apache::RequestUtil   PACKAGE=guess
mpxs_Apache__RequestRec_push_handlers
mpxs_Apache__RequestRec_set_handlers
  
  
  
  1.64  +19 -1 modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- FunctionTable.pm  18 May 2002 23:56:54 -  1.63
  +++ FunctionTable.pm  19 May 2002 20:11:55 -  1.64
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by ModPerl::ParseSource/0.01
  -# !  Sat May 18 16:46:32 2002
  +# !  Sun May 19 12:59:55 2002
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -4366,6 +4366,24 @@
 {
   'type' => 'request_rec *',
   'name' => 'r'
  +  }
  +]
  +  },
  +  {
  +'return_type' => 'const char *',
  +'name' => 'mpxs_Apache__RequestRec_content_type',
  +'args' => [
  +  {
  +'type' => 'PerlInterpreter *',
  +'name' => 'my_perl'
  +  },
  +  {
  +'type' => 'request_rec *',
  +'name' => 'r'
  +  },
  +  {
  +'type' => 'SV *',
  +'name' => 'type'
 }
   ]
 },
  
  
  



cvs commit: modperl-2.0/xs/Apache/RequestRec Apache__RequestRec.h

2002-05-19 Thread dougm

dougm   02/05/19 13:09:27

  Added:   xs/Apache/RequestRec Apache__RequestRec.h
  Log:
  wrapper for $r->content_type
  
  Revision  ChangesPath
  1.1  modperl-2.0/xs/Apache/RequestRec/Apache__RequestRec.h
  
  Index: Apache__RequestRec.h
  ===
  static MP_INLINE
  const char *mpxs_Apache__RequestRec_content_type(pTHX_ request_rec *r,
   SV *type)
  {
  const char *retval = r->content_type;
  
  if (type) {
  STRLEN len;
  const char *val = SvPV(type, len);
  ap_set_content_type(r, apr_pmemdup(r->pool, val, len));
  }
  
  return retval;
  }
  
  
  



cvs commit: modperl-2.0/xs/Apache/RequestRec - New directory

2002-05-19 Thread dougm

dougm   02/05/19 13:08:46

  modperl-2.0/xs/Apache/RequestRec - New directory



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

2002-05-19 Thread dougm

dougm   02/05/19 12:46:08

  Modified:.Makefile.PL
   lib/Apache Build.pm
  Log:
  add some more validation of MP_AP_PREFIX
  
  Revision  ChangesPath
  1.80  +5 -1  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- Makefile.PL   19 May 2002 19:08:11 -  1.79
  +++ Makefile.PL   19 May 2002 19:46:08 -  1.80
  @@ -124,7 +124,11 @@
   if ($build->{MP_APXS}) {
   debug "Using APXS => $build->{MP_APXS}";
   }
  -elsif ($build->{MP_AP_PREFIX} and -e $build->apxs(-q => 'INCLUDEDIR')) {
  +elsif ($build->{MP_AP_PREFIX}) {
  +if (my $reason = $build->ap_prefix_invalid) {
  +error "invalid MP_AP_PREFIX: $reason";
  +exit 1;
  +}
   debug "Using Apache prefix => $build->{MP_AP_PREFIX}";
   }
   else {
  
  
  
  1.84  +22 -0 modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- Build.pm  14 May 2002 18:22:05 -  1.83
  +++ Build.pm  19 May 2002 19:46:08 -  1.84
  @@ -49,6 +49,28 @@
   PREFIX => '',
   );
   
  +sub ap_prefix_invalid {
  +my $self = shift;
  +
  +my $prefix = $self->{MP_AP_PREFIX};
  +
  +unless (-d $prefix) {
  +return "$prefix: No such file or directory";
  +}
  +
  +my $include_dir = $self->apxs(-q => 'INCLUDEDIR');
  +
  +unless (-e $include_dir) {
  +return "include/ directory not found in $prefix";
  +}
  +
  +if (-e "$prefix/CHANGES") {
  +return "$prefix is a build directory (need an install directory)";
  +}
  +
  +return '';
  +}
  +
   sub apxs {
   my $self = shift;
   
  
  
  



cvs commit: modperl-2.0/t/response/TestAPI module.pm

2002-05-19 Thread dougm

dougm   02/05/19 12:10:45

  Modified:t/response/TestAPI module.pm
  Log:
  fix broken test #2
  
  Revision  ChangesPath
  1.7   +2 -2  modperl-2.0/t/response/TestAPI/module.pm
  
  Index: module.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/module.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- module.pm 13 May 2002 18:19:28 -  1.6
  +++ module.pm 19 May 2002 19:10:45 -  1.7
  @@ -24,8 +24,8 @@
   
   ok $top_module;
   
  -ok t_cmp($cfg->{httpd_info}->{MODULE_MAGIC_NUMBER},
  - $top_module->version . ':0',
  +ok t_cmp($cfg->{httpd_info}->{MODULE_MAGIC_NUMBER_MAJOR},
  + $top_module->version,
q{$top_module->version});
   
   ok t_cmp(scalar keys %{ $cfg->{modules} },
  
  
  



cvs commit: modperl-2.0 Makefile.PL README

2002-05-19 Thread dougm

dougm   02/05/19 12:08:11

  Modified:.Makefile.PL README
  Log:
  require Apache/2.0.36 or higher
  
  Revision  ChangesPath
  1.79  +9 -0  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- Makefile.PL   14 May 2002 23:14:35 -  1.78
  +++ Makefile.PL   19 May 2002 19:08:11 -  1.79
  @@ -2,6 +2,8 @@
   use strict;
   use warnings FATAL => 'all';
   
  +my $min_httpd_version = '2.0.36';
  +
   my($old_modperl_version, $old_modperl_pm);
   
   BEGIN {
  @@ -131,6 +133,7 @@
   my $mmn = $build->module_magic_number;
   my $v   = $build->httpd_version;
   next unless $v;
  +next if $v lt $min_httpd_version;
   last if $build->prompt_y("Configure mod_perl with $path?");
   }
   }
  @@ -145,6 +148,12 @@
   else {
   error 'Please specify MP_APXS or MP_AP_PREFIX.';
   }
  +exit(1);
  +}
  +
  +if ($httpd_version lt $min_httpd_version) {
  +error "Apache/$httpd_version not supported, " .
  +  "$min_httpd_version or higher is required";
   exit(1);
   }
   
  
  
  
  1.5   +1 -1  modperl-2.0/README
  
  Index: README
  ===
  RCS file: /home/cvs/modperl-2.0/README,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- README19 May 2002 09:33:03 -  1.4
  +++ README19 May 2002 19:08:11 -  1.5
  @@ -1,6 +1,6 @@
   This is mod_perl version 2.0-tobe
   
  -Apache version 2.0.37 or higher is required.
  +Apache version 2.0.36 or higher is required.
   
   Perl version 5.6.0 or higher is required.
   
  
  
  



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

2002-05-19 Thread stas

stas02/05/19 04:41:53

  Modified:.Changes
   lib/Apache compat.pm
   t/response/TestApache compat2.pm
  Log:
  add the err_header_out() wrapper to Apache::compat + corresponding tests.
  
  Revision  ChangesPath
  1.11  +2 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Changes   14 May 2002 01:14:19 -  1.10
  +++ Changes   19 May 2002 11:41:53 -  1.11
  @@ -10,6 +10,8 @@
   
   =item 1.99_02-dev
   
  +add the err_header_out() wrapper to Apache::compat + corresponding tests
  +
   add Apache::Util::unescape_uri alias to Apache::unescape_url in Apache::compat
   
   change Apache::unescape_url to return the escaped url as 1.x does
  
  
  
  1.45  +8 -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.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- compat.pm 18 May 2002 01:12:15 -  1.44
  +++ compat.pm 19 May 2002 11:41:53 -  1.45
  @@ -142,6 +142,14 @@
   : scalar($r->table_get_set(scalar($r->headers_in), @_));
   }
   
  +sub err_header_out {
  +my $r = shift;
  +return wantarray() 
  +?   ($r->table_get_set(scalar($r->err_headers_out), @_))
  +: scalar($r->table_get_set(scalar($r->err_headers_out), @_));
  +}
  +
  +
   sub register_cleanup {
   shift->pool->cleanup_register(@_);
   }
  
  
  
  1.7   +47 -43modperl-2.0/t/response/TestApache/compat2.pm
  
  Index: compat2.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat2.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- compat2.pm14 May 2002 01:14:19 -  1.6
  +++ compat2.pm19 May 2002 11:41:53 -  1.7
  @@ -24,7 +24,7 @@
   sub handler {
   my $r = shift;
   
  -plan $r, tests => 35;
  +plan $r, tests => 39;
   
   $r->send_http_header('text/plain');
   
  @@ -35,51 +35,55 @@
   ok t_cmp('GLOB', ref($fh), "Apache->gensym");
   
   # test header_in and header_out
  -for my $way (qw(in out)) {
  -my $sub_test = "header_$way";
  -my $sub_good = "headers_$way";
  -my $key = 'header-test';
  -
  -# scalar context
  -{
  -my $key;
  -if ($way eq 'in') {
  -$key = "user-agent"; # should exist with lwp
  +# and err_header_out
  +for my $prefix ('err_', '') {
  +my @ways = 'out';
  +push @ways, 'in' unless $prefix;
  +for my $way (@ways) {
  +my $sub_test = "${prefix}header_$way";
  +my $sub_good = "${prefix}headers_$way";
  +my $key = 'header-test';
  +
  +# scalar context
  +{
  +my $key;
  +if ($way eq 'in') {
  +$key = "user-agent"; # should exist with lwp
  +} else {
  +# outgoing headers aren't set yet, so we set one
  +$key = "X-barabara";
  +$r->$sub_good->set($key, $key x 2);
  +}
  +
  +ok t_cmp($r->$sub_good->get($key),
  + $r->$sub_test($key),
  + "\$r->$sub_test in scalar context");
   }
  -else {
  -# outgoing headers aren't set yet, so we set one
  -$key = "X-barabara";
  -$r->$sub_good->set($key, $key x 2);
  +
  +# list context
  +{
  +my @exp = qw(foo bar);
  +$r->$sub_good->add($key => $_) for @exp;
  +ok t_cmp(\@exp,
  + [ $r->$sub_test($key) ],
  + "\$r->$sub_test in list context");
  +}
  +
  +# set
  +{
  +my $exp = $key x 2;
  +$r->$sub_test($key => $exp);
  +my $got = $r->$sub_test($key);
  +ok t_cmp($exp, $got, "\$r->$sub_test set()");
   }
   
  -ok t_cmp($r->$sub_good->get($key),
  - $r->$sub_test($key),
  - "\$r->$sub_test in scalar context");
  -}
  -
  -# list context
  -{
  -my @exp = qw(foo bar);
  -$r->$sub_good->add($key => $_) for @exp;
  -ok t_cmp(\@exp,
  - [ $r->$sub_test($key) ],
  - "\$r->$sub_test in list context");
  -}
  -
  -# set
  -{
  -my $exp = $key x 2;
  -$r->$sub_tes

cvs commit: modperl-2.0 README

2002-05-19 Thread stas

stas02/05/19 02:33:03

  Modified:.README
  Log:
  - add a pointer to /docs
  - update the requirement to 2.0.37
  
  Revision  ChangesPath
  1.4   +4 -1  modperl-2.0/README
  
  Index: README
  ===
  RCS file: /home/cvs/modperl-2.0/README,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- README7 Apr 2002 00:27:59 -   1.3
  +++ README19 May 2002 09:33:03 -  1.4
  @@ -1,6 +1,6 @@
   This is mod_perl version 2.0-tobe
   
  -Apache version 2.0.35 or higher is required.
  +Apache version 2.0.37 or higher is required.
   
   Perl version 5.6.0 or higher is required.
   
  @@ -10,6 +10,9 @@
   
   Only DSO build of mod_perl-2.0 is currently supported, static builds
   will be support in the future.
  +
  +docs are available in /docs. Currently they don't get installed on
  +'make install'. Certain API documentation can be found in docs/api/.
   
   mod_perl-2.0-tobe is not 100% feature complete with the 1.xx version.
   See the todo/ directory for what remains to be done.
  
  
  



cvs commit: modperl-2.0 STATUS

2002-05-19 Thread stas

stas02/05/19 02:28:06

  Added:   .STATUS
  Log:
  start the STATUS file
  
  Revision  ChangesPath
  1.1  modperl-2.0/STATUS
  
  Index: STATUS
  ===
  mod_perl 2.0 STATUS:   -*-text-*-
 Last modified at [$Date: 2002/05/19 09:28:06 $]
  
  Release:
  
  
 1.99_02-dev: In development.
 1.99_01: Released April 06, 2002
  
  Release Showstoppers:
  -
  
   * 
 Report: 
 Status: 
  
  
  
  Available Patches:
  --
  
  
  Needs Patch or Further Investigation:
  -
  
  
  Open Issues or Core Enhancements:
  -
  
  
  Documentation:
  --
  
  
  Patches unlikely to be applied:
  ---
  
   * 
 Report: 
 Status: 
  
  
  
  



cvs commit: modperl-2.0/t/response/TestModperl dir_config.pm

2002-05-19 Thread stas

stas02/05/19 02:05:15

  Modified:t/response/TestModperl dir_config.pm
  Log:
  - the last added sub-test was a duplicate, merge the two
  - make the debug comments more user-friendly
  
  Revision  ChangesPath
  1.6   +13 -20modperl-2.0/t/response/TestModperl/dir_config.pm
  
  Index: dir_config.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/dir_config.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- dir_config.pm 19 May 2002 08:55:54 -  1.5
  +++ dir_config.pm 19 May 2002 09:05:15 -  1.6
  @@ -16,7 +16,7 @@
   sub handler {
   my $r = shift;
   
  -plan $r, tests => 14;
  +plan $r, tests => 13;
   
   #Apache::RequestRec::dir_config tests
   
  @@ -40,10 +40,11 @@
   
   # sub-section inherits from super-section if it doesn't override it
   {
  -my $key = 'TestModperl__request_rec_Key_set_in_Base';
  -ok t_cmp('BaseValue', $r->dir_config->get($key),
  - "sub-section inherits from super-section if" .
  - "it doesn't override it");
  +my $key = make_key('_set_in_Base');
  +ok t_cmp('BaseValue',
  + $r->dir_config($key),
  + "sub-section inherits from super-section " .
  + "if it doesn't override it");
   }
   
   # sub-section overrides super-section for the same key
  @@ -60,13 +61,13 @@
   # PerlSetVar key)
   ok t_cmp('SetValue0',
$dir_config->get($key),
  - qq{\$dir_config->get("$key")});
  + "table get() in a scalar context");
   
  -#  direct fetch test in a scalar context (for a single
  -#  PerlSetVar)
  +# direct fetch test in a scalar context (for a single
  +# PerlSetVar key)
   ok t_cmp('SetValue0',
$r->dir_config($key),
  - qq{\$r->dir_config("$key")});
  + "direct value fetch in a scalar context");
   }
   
   # test non-existent key
  @@ -75,7 +76,7 @@
   
   ok t_cmp(undef,
$r->dir_config($key),
  - qq{\$r->dir_config("$key")});
  + "non-existent key");
   }
   
   # test set interface
  @@ -87,7 +88,7 @@
   
   ok t_cmp($val,
$r->dir_config($key),
  - qq{\$r->dir_config($key => "$val")});
  + "set && get");
   }
   
   # test unset interface
  @@ -99,17 +100,9 @@
   
   ok t_cmp(undef,
$r->dir_config($key),
  - qq{\$r->dir_config($key => undef)});
  + "unset");
   }
   
  -# test PerlSetVar set in base config
  -{
  -my $key = make_key('_set_in_Base');
  -
  -ok t_cmp("BaseValue",
  - $r->dir_config($key),
  - qq{\$r->dir_config("$key")});
  -}
   
   #Apache::Server::dir_config tests
   
  
  
  



cvs commit: modperl-2.0/t/response/TestModperl dir_config.pm

2002-05-19 Thread stas

stas02/05/19 01:55:55

  Modified:t/response/TestModperl dir_config.pm
  Log:
  test that a sub-section inherits from super-section if it doesn't override
  it
  
  Revision  ChangesPath
  1.5   +12 -4 modperl-2.0/t/response/TestModperl/dir_config.pm
  
  Index: dir_config.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/dir_config.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- dir_config.pm 19 May 2002 07:53:27 -  1.4
  +++ dir_config.pm 19 May 2002 08:55:54 -  1.5
  @@ -16,7 +16,7 @@
   sub handler {
   my $r = shift;
   
  -plan $r, tests => 13;
  +plan $r, tests => 14;
   
   #Apache::RequestRec::dir_config tests
   
  @@ -35,14 +35,22 @@
   my @expected = qw(1_SetValue 2_AddValue 3_AddValue 4_AddValue);
   
   ok t_cmp(\@expected, \@received,
  - 'testing PerlAddVar ITERATE2');
  + 'PerlAddVar ITERATE2');
   }
   
  -# sub-section overrides parent section for the same key
  +# sub-section inherits from super-section if it doesn't override it
  +{
  +my $key = 'TestModperl__request_rec_Key_set_in_Base';
  +ok t_cmp('BaseValue', $r->dir_config->get($key),
  + "sub-section inherits from super-section if" .
  + "it doesn't override it");
  +}
  +
  +# sub-section overrides super-section for the same key
   {
   my $key = 'TestModperl__server_rec_Key_set_in_Base';
   ok t_cmp('SubSecValue', $r->dir_config->get($key),
  - "sub-section overrides parent section for the same key");
  + "sub-section overrides super-section for the same key");
   }
   
   {
  
  
  



cvs commit: modperl-2.0/t/response/TestModperl dir_config.pm

2002-05-19 Thread stas

stas02/05/19 00:53:27

  Modified:t/response/TestModperl dir_config.pm
  Log:
  test that sub-section overrides parent section for the same key
  
  Revision  ChangesPath
  1.4   +9 -2  modperl-2.0/t/response/TestModperl/dir_config.pm
  
  Index: dir_config.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/dir_config.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- dir_config.pm 11 Apr 2002 11:08:44 -  1.3
  +++ dir_config.pm 19 May 2002 07:53:27 -  1.4
  @@ -16,7 +16,7 @@
   sub handler {
   my $r = shift;
   
  -plan $r, tests => 12;
  +plan $r, tests => 13;
   
   #Apache::RequestRec::dir_config tests
   
  @@ -38,6 +38,13 @@
'testing PerlAddVar ITERATE2');
   }
   
  +# sub-section overrides parent section for the same key
  +{
  +my $key = 'TestModperl__server_rec_Key_set_in_Base';
  +ok t_cmp('SubSecValue', $r->dir_config->get($key),
  + "sub-section overrides parent section for the same key");
  +}
  +
   {
   my $key = make_key('0');
   
  @@ -159,4 +166,4 @@
   PerlAddVar TestModperl__request_rec_Key1 2_AddValue
   PerlAddVar TestModperl__request_rec_Key1 3_AddValue 4_AddValue
   
  -PerlSetVar TestModperl__server_rec_Key_set_in_Base WhatEver
  +PerlSetVar TestModperl__server_rec_Key_set_in_Base SubSecValue