httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache Test.pm
Date Fri, 30 Jan 2004 00:06:42 GMT
stas        2004/01/29 16:06:42

  Modified:    perl-framework/Apache-Test/lib/Apache Test.pm
  Log:
  extend Apache::Test::vars to support argument to query
  
  Revision  Changes    Path
  1.74      +24 -1     httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm
  
  Index: Test.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -u -r1.73 -r1.74
  --- Test.pm	8 Jan 2004 17:15:37 -0000	1.73
  +++ Test.pm	30 Jan 2004 00:06:42 -0000	1.74
  @@ -32,7 +32,7 @@
   }
   
   sub vars {
  -    config()->{vars};
  +    @_ ? @{ config()->{vars} }{ @_ } : config()->{vars};
   }
   
   sub sok (&;$) {
  @@ -690,6 +690,29 @@
   reference, but be careful that the keys will be different.
   
   Also see plan().
  +
  +=item config
  +
  +  my $cfg = Apache::Test::config();
  +  my $server_rev = $cfg->{server}->{rev};
  +  ...
  +
  +C<config()> gives an access to the configuration object.
  +
  +=item vars
  +
  +  my $serverroot = Apache::Test::vars->{serverroot};
  +  my $serverroot = Apache::Test::vars('serverroot');
  +  my($top_dir, $t_dir) = Apache::Test::vars(qw(top_dir t_dir));
  +
  +C<vars()> gives an access to the configuration variables, otherwise
  +accessible as:
  +
  +  $vars = Apache::Test::config()->{vars};
  +
  +If no arguments are passed, the reference to the variables hash is
  +returned. If one or more arguments are passed the corresponding values
  +are returned.
   
   =back
   
  
  
  

Mime
View raw message