summaryrefslogtreecommitdiff
path: root/lib/warnings.t
diff options
context:
space:
mode:
authorPaul Marquess <paul.marquess@btinternet.com>2002-03-25 13:01:44 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-25 14:10:20 +0000
commit99ef548ba710eb2617804c989e4d5fdae1f04f37 (patch)
tree8295e26e58493474c765534c211849219ab506c7 /lib/warnings.t
parent696235b60874be65fe029a39969f44a0133ec2f8 (diff)
downloadperl-99ef548ba710eb2617804c989e4d5fdae1f04f37.tar.gz
warnings for perlio + others
From: "Paul Marquess" <paul_marquess@yahoo.co.uk> Message-ID: <AIEAJICLCBDNAAOLLOKLMEKNEAAA.paul_marquess@yahoo.co.uk> p4raw-id: //depot/perl@15485
Diffstat (limited to 'lib/warnings.t')
-rw-r--r--lib/warnings.t9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/warnings.t b/lib/warnings.t
index 009dee0cbb..d952906dfe 100644
--- a/lib/warnings.t
+++ b/lib/warnings.t
@@ -7,6 +7,8 @@ BEGIN {
require Config; import Config;
}
+use File::Path;
+
$| = 1;
my $Is_VMS = $^O eq 'VMS';
@@ -58,6 +60,7 @@ for (@prgs){
}
my $switch = "";
my @temps = () ;
+ my @temp_path = () ;
if (s/^\s*-\w+//){
$switch = $&;
$switch =~ s/(-\S*[A-Z]\S*)/"$1"/ if $Is_VMS; # protect uc switches
@@ -73,6 +76,10 @@ for (@prgs){
my $filename = shift @files ;
my $code = shift @files ;
push @temps, $filename ;
+ if ($filename =~ m#(.*)/#) {
+ mkpath($1);
+ push(@temp_path, $1);
+ }
open F, ">$filename" or die "Cannot open $filename: $!\n" ;
print F $code ;
close F or die "Cannot close $filename: $!\n";
@@ -154,6 +161,8 @@ for (@prgs){
print "ok ", ++$i, "\n";
foreach (@temps)
{ unlink $_ if $_ }
+ foreach (@temp_path)
+ { rmtree $_ if -d $_ }
}
sub randomMatch