gozer       2004/08/11 16:03:18

  Modified:    xs/maps  modperl_functions.map apache_functions.map
               t/response/TestDirective perlloadmodule4.pm
               .        Changes
  Log:
  Move check_cmd_context from Apache::Command to Apache::CmdParms
  Test that it actually works with the newly available :context
  constants.
  
  Revision  Changes    Path
  1.82      +1 -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.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- modperl_functions.map     16 Jul 2004 22:38:36 -0000      1.81
  +++ modperl_functions.map     11 Aug 2004 23:03:17 -0000      1.82
  @@ -144,6 +144,7 @@
    DEFINE_lookup | MPXS_Apache__Directive_lookup | ...
   
   MODULE=Apache::CmdParms
  + ap_check_cmd_context
    mpxs_Apache__CmdParms_info
   
   MODULE=Apache::MPM    PACKAGE=Apache::MPM   BOOT=1
  
  
  
  1.94      +0 -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.93
  retrieving revision 1.94
  diff -u -r1.93 -r1.94
  --- apache_functions.map      11 Aug 2004 18:16:29 -0000      1.93
  +++ apache_functions.map      11 Aug 2004 23:03:18 -0000      1.94
  @@ -277,7 +277,6 @@
   
   MODULE=Apache::Command
    command_rec *:DEFINE_next | | command_rec *:cmd
  - ap_check_cmd_context
   -ap_soak_end_container
   -ap_set_int_slot
   -ap_set_file_slot
  
  
  
  1.6       +8 -2      modperl-2.0/t/response/TestDirective/perlloadmodule4.pm
  
  Index: perlloadmodule4.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/perlloadmodule4.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- perlloadmodule4.pm        9 Jul 2004 15:27:32 -0000       1.5
  +++ perlloadmodule4.pm        11 Aug 2004 23:03:18 -0000      1.6
  @@ -22,7 +22,7 @@
   use Apache::Module ();
   use Apache::ServerUtil ();
   
  -use Apache::Const -compile => qw(OK);
  +use Apache::Const -compile => qw(OK NOT_IN_LOCATION);
   
   use constant KEY => "MyTest4";
   
  @@ -31,6 +31,9 @@
   sub MyTest4 {
       my($self, $parms, $arg) = @_;
       $self->{+KEY} = $arg;
  +    
  +    $self->{KEY.'-Error'} = $parms->check_cmd_context(Apache::NOT_IN_LOCATION);
  +    
       unless ($parms->path) {
           my $srv_cfg = Apache::Module->get_config($self, $parms->server);
           $srv_cfg->{+KEY} = $arg;
  @@ -63,13 +66,16 @@
       my $dir_cfg = get_config($s, $r->per_dir_config);
       my $srv_cfg = get_config($s);
   
  -    plan $r, tests => 3;
  +    plan $r, tests => 5;
   
       ok $s->is_virtual;
   
       ok t_cmp($dir_cfg->{+KEY}, "Dir", "Section");
   
       ok t_cmp($srv_cfg->{+KEY}, "Vhost", "Section");
  +    
  +    ok t_cmp($dir_cfg->{KEY.'-Error'}, KEY . " cannot occur within <Location> 
section", "check_cmd_context");
  +    ok t_cmp($srv_cfg->{KEY.'-Error'}, undef, "check_cmd_context");
   
       return Apache::OK;
   }
  
  
  
  1.441     +3 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.440
  retrieving revision 1.441
  diff -u -r1.440 -r1.441
  --- Changes   11 Aug 2004 22:49:15 -0000      1.440
  +++ Changes   11 Aug 2004 23:03:18 -0000      1.441
  @@ -12,6 +12,9 @@
   
   =item 1.99_15-dev
   
  +Move check_cmd_context from Apache::Command to Apache::CmdParms.
  +[Gozer]
  +
   Add :context group of constants for check_cmd_context().
   NOT_IN_VIRTUALHOST, NOT_IN_LIMIT, NOT_IN_DIRECTORY, NOT_IN_LOCATION,
   NOT_IN_FILES, NOT_IN_DIR_LOC_FILE & GLOBAL_ONLY [Gozer]
  
  
  

Reply via email to