From 9aedf6d8e83e13ae89ffc7703fb74a4ce8e37fc1 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Tue, 20 Jan 2004 20:26:18 +0000 Subject: [PATCH] Fix precedence errors and add some cleanup in the new DBM_Filter tests p4raw-id: //depot/perl@22183 --- lib/DBM_Filter/t/01error.t | 6 ++++-- lib/DBM_Filter/t/02core.t | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/DBM_Filter/t/01error.t b/lib/DBM_Filter/t/01error.t index 4ebbfd8..f66030a 100644 --- a/lib/DBM_Filter/t/01error.t +++ b/lib/DBM_Filter/t/01error.t @@ -11,15 +11,17 @@ our $db ; if ( ! -d 'DBM_Filter') { mkdir 'DBM_Filter', 0777 - || die "Cannot create directory 'DBM_Filter': $!\n" ; + or die "Cannot create directory 'DBM_Filter': $!\n" ; } } +END { rmdir 'DBM_Filter' } + sub writeFile { my $filename = shift ; my $content = shift; - open F, ">$filename" || croak "Cannot open $filename: $!" ; + open F, ">$filename" or croak "Cannot open $filename: $!" ; print F $content ; close F; } diff --git a/lib/DBM_Filter/t/02core.t b/lib/DBM_Filter/t/02core.t index fe1dc8c..77a6a6c 100644 --- a/lib/DBM_Filter/t/02core.t +++ b/lib/DBM_Filter/t/02core.t @@ -12,16 +12,17 @@ use lib '.'; if ( ! -d 'DBM_Filter') { mkdir 'DBM_Filter', 0777 - || die "Cannot create directory 'DBM_Filter': $!\n" ; + or die "Cannot create directory 'DBM_Filter': $!\n" ; } } +END { rmdir 'DBM_Filter' } sub writeFile { my $filename = shift ; my $content = shift; - open F, ">DBM_Filter/$filename.pm" || croak "Cannot open $filename: $!" ; + open F, ">DBM_Filter/$filename.pm" or croak "Cannot open $filename: $!" ; print F $content ; close F; $files{"DBM_Filter/$filename.pm"} ++; -- 2.7.4