Return-Path: Delivered-To: apmail-modperl-cvs-archive@apache.org Received: (qmail 69437 invoked by uid 500); 8 Oct 2001 23:55:07 -0000 Mailing-List: contact modperl-cvs-help@apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@perl.apache.org Delivered-To: mailing list modperl-cvs@apache.org Received: (qmail 69426 invoked by uid 500); 8 Oct 2001 23:55:07 -0000 Delivered-To: apmail-modperl-2.0-cvs@apache.org Date: 8 Oct 2001 23:51:21 -0000 Message-ID: <20011008235121.74253.qmail@icarus.apache.org> From: dougm@apache.org To: modperl-2.0-cvs@apache.org Subject: cvs commit: modperl-2.0/lib/Apache compat.pm X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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 { }