From ecb25af97972af163752a5ff6f0a2efdaf1903c1 Mon Sep 17 00:00:00 2001 From: doogie <> Date: Sun, 30 Apr 2000 10:28:57 -0800 Subject: [PATCH] [project @ 2000-04-30 11:28:57 by doogie] Added a DEBUG method, and fixed compilation of quit(). --- Debbugs/Common.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Debbugs/Common.pm b/Debbugs/Common.pm index 67a032a..b940edf 100644 --- a/Debbugs/Common.pm +++ b/Debbugs/Common.pm @@ -20,6 +20,9 @@ BEGIN { use vars @EXPORT_OK; use Debbugs::Config qw(%Globals); +use FileHandle; +my @cleanups; +my $DEBUG = new FileHandle; sub fail { @@ -41,10 +44,14 @@ sub NameToPathHash return "$3/$2/$1/$name"; } +sub DEBUG +{ + print $DEBUG $_; +} sub quit { - print DEBUG "quitting >$_[0]<\n"; - local ($u); + DEBUG("quitting >$_[0]<\n"); + my $u; while ($u= $cleanups[$#cleanups]) { &$u; } die "*** $_[0]\n"; } -- 2.39.2