Remove an unreferenced local variable in Digest-MD5
[p5sagit/p5-mst-13.2.git] / ext / Devel / PPPort / ppport_h.PL
index 5a695d2..f8ed365 100644 (file)
@@ -1,17 +1,26 @@
+################################################################################
+#
+#  ppport_h.PL -- generate ppport.h
+#
+################################################################################
+#
+#  $Revision: 4 $
+#  $Author: mhx $
+#  $Date: 2005/01/31 08:10:54 +0100 $
+#
+################################################################################
+#
+#  Version 3.x, Copyright (C) 2004-2005, Marcus Holland-Moritz.
+#  Version 2.x, Copyright (C) 2001, Paul Marquess.
+#  Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the same terms as Perl itself.
+#
+################################################################################
+
 package Devel::PPPort; 
 sub bootstrap {}; 
 require "PPPort.pm";
-WriteFile("ppport.tmp");
-{
-    local $/;
-    my $old = '';
-    my $new = '';
-    $old = <FH> if open(FH, "ppport.h");       close FH;
-    $new = <FH> if open(FH, "ppport.tmp");     close FH;
-    if ($old ne $new) {
-       unlink("ppport.h");
-       rename("ppport.tmp", "ppport.h");
-    }
-    unlink("ppport.tmp");
-}
-
+rename 'ppport.h', 'ppport.old' if -f 'ppport.h';
+unlink "ppport.old" if WriteFile("ppport.h") && -f 'ppport.h';