$OpenBSD: patch-kde-dev-scripts_qt4_convert-qboxlayout_pl,v 1.2 2013/07/05 14:32:50 zhuk Exp $
Cleanup development scripts, making them more portable and secure.
Upstream review 110858: http://git.reviewboard.kde.org/r/110858/
--- kde-dev-scripts/qt4/convert-qboxlayout.pl.orig	Fri Jun 28 22:03:13 2013
+++ kde-dev-scripts/qt4/convert-qboxlayout.pl	Fri Jul  5 18:14:32 2013
@@ -19,15 +19,16 @@ use lib dirname( $0 );
 use functionUtilkde;
 use strict;
 
-open(my $F, q(find -name "*" | grep -v '\.svn/' |));
+open(my $F, "-|", qw(find . -type f));
 my $file;
 while ($file = <$F>) {
+    next if $file =~ /\.svn/;
     chomp $file;
     next if functionUtilkde::excludeFile( $file);
 
     my $modified;
     my @necessaryIncludes = ();
-    open(my $FILE, $file) or warn "We can't open file $file:$!\n";
+    open(my $FILE, "<", $file) or warn "We can't open file $file:$!\n";
     my @l = map {
       my $orig = $_;
       my ($spaces, $trailer, $object, $call, $ws, $parent, $params);
@@ -99,7 +100,7 @@ while ($file = <$F>) {
 
     if ($modified) {
       print "Modified: $file\n";
-      open (my $OUT, ">$file");
+      open (my $OUT, ">", $file);
       print $OUT @l;
       close $OUT;
     }
