perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/lib/Apache compat.pm
Date Mon, 08 Oct 2001 23:51:21 GMT
dougm       01/10/08 16:51:21

  Modified:    lib/Apache compat.pm
  Log:
  add Apache::exit compat wrapper
  
  Revision  Changes    Path
  1.21      +17 -1     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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- compat.pm	2001/10/08 20:07:33	1.20
  +++ compat.pm	2001/10/08 23:51:21	1.21
  @@ -35,7 +35,23 @@
   
   package Apache;
   
  -#XXX: exit,warn
  +sub exit {
  +    require ModPerl::Util;
  +
  +    my $status = 0;
  +    my $nargs = @_;
  +
  +    if ($nargs == 2) {
  +        $status = $_[1];
  +    }
  +    elsif ($nargs == 1 and $_[0] =~ /^\d+$/) {
  +        $status = $_[0];
  +    }
  +
  +    ModPerl::Util::exit($status);
  +}
  +
  +#XXX: warn
   sub import {
   }
   
  
  
  

Mime
View raw message