From ac12b2841afd63b6a9cc771750c510a7df4f1090 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 22 May 2014 15:04:12 +0200 Subject: [PATCH] scripts/dbupgrade2_tool.pl: bei --create --type pl auch package stub anlegen --- scripts/dbupgrade2_tool.pl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/dbupgrade2_tool.pl b/scripts/dbupgrade2_tool.pl index 5ed9c27c1..7b614a8ec 100755 --- a/scripts/dbupgrade2_tool.pl +++ b/scripts/dbupgrade2_tool.pl @@ -299,6 +299,23 @@ sub create_upgrade { print $fh "$comment \@description: $description\n"; print $fh "$comment \@depends: @depends\n"; print $fh "$comment \@encoding: $encoding\n"; + + if ($type eq 'pl') { + print $fh "package SL::DBUpgrade2::$filename;\n"; + print $fh "\n"; + print $fh "use strict;\n"; + print $fh "use utf8;\n" if $encoding =~ /utf.?8/i; + print $fh "\n"; + print $fh "use parent qw(SL::DBUpgrade2::Base);\n"; + print $fh "\n"; + print $fh "sub run {\n"; + print $fh " my (\$self) = \@_;\n"; + print $fh "\n"; + print $fh "}\n"; + print $fh "\n"; + print $fh "1;\n"; + } + close $fh; print "File $full_filename created.\n"; -- 2.20.1