dougm       02/05/24 10:40:44

  Modified:    lib/Apache compat.pm
               t/response/TestApache compat2.pm
  Log:
  add Apache::Util::parsedate compat alias to APR::Date::parse_http
  
  Revision  Changes    Path
  1.53      +3 -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.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- compat.pm 24 May 2002 17:37:08 -0000      1.52
  +++ compat.pm 24 May 2002 17:40:44 -0000      1.53
  @@ -29,6 +29,7 @@
   use Apache::Util ();
   use Apache::Log ();
   use Apache::URI ();
  +use APR::Date ();
   use APR::Table ();
   use APR::Pool ();
   use APR::URI ();
  @@ -451,6 +452,8 @@
   
       return Apache::Util::format_time($t, $fmt, $gmt, $r->pool);
   }
  +
  +*parsedate = \&APR::Date::parse_http;
   
   sub Apache::URI::parse {
       my($class, $r, $uri) = @_;
  
  
  
  1.11      +7 -2      modperl-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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- compat2.pm        24 May 2002 17:37:08 -0000      1.10
  +++ compat2.pm        24 May 2002 17:40:44 -0000      1.11
  @@ -24,7 +24,7 @@
   sub handler {
       my $r = shift;
   
  -    plan $r, tests => 43;
  +    plan $r, tests => 44;
   
       $r->send_http_header('text/plain');
   
  @@ -217,9 +217,14 @@
                "Apache::Util::escape_html");
   
   
  -    my $fmtdate = Apache::Util::ht_time();
  +    my $time = time;
  +    my $fmtdate = Apache::Util::ht_time($time);
   
       ok t_cmp($fmtdate, $fmtdate, "Apache::Util::ht_time");
  +
  +    my $ptime = Apache::Util::parsedate($fmtdate);
  +
  +    ok t_cmp($time, $ptime, "Apache::Util::parsedate");
   
       OK;
   }
  
  
  


Reply via email to