From: Rafael Garcia-Suarez Date: Mon, 23 Oct 2006 08:28:08 +0000 (+0000) Subject: Protection against overwriting defsubs.h via a symlink X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd40a117d944c5311ff8dd0bde49755b81f72661;p=p5sagit%2Fp5-mst-13.2.git Protection against overwriting defsubs.h via a symlink (by Jim Cromie) p4raw-id: //depot/perl@29089 --- diff --git a/ext/B/defsubs_h.PL b/ext/B/defsubs_h.PL index f8c4225..0a1f781 100644 --- a/ext/B/defsubs_h.PL +++ b/ext/B/defsubs_h.PL @@ -4,6 +4,7 @@ #!perl my ($out) = __FILE__ =~ /(^.*)\.PL/i; $out =~ s/_h$/.h/; +unlink $out if -l $out; open(OUT,">$out") || die "Cannot open $file:$!"; print "Extracting $out...\n"; print OUT <<"END";