Revision ac12b284
Von Sven Schöling vor mehr als 10 Jahren hinzugefügt
scripts/dbupgrade2_tool.pl | ||
---|---|---|
299 | 299 |
print $fh "$comment \@description: $description\n"; |
300 | 300 |
print $fh "$comment \@depends: @depends\n"; |
301 | 301 |
print $fh "$comment \@encoding: $encoding\n"; |
302 |
|
|
303 |
if ($type eq 'pl') { |
|
304 |
print $fh "package SL::DBUpgrade2::$filename;\n"; |
|
305 |
print $fh "\n"; |
|
306 |
print $fh "use strict;\n"; |
|
307 |
print $fh "use utf8;\n" if $encoding =~ /utf.?8/i; |
|
308 |
print $fh "\n"; |
|
309 |
print $fh "use parent qw(SL::DBUpgrade2::Base);\n"; |
|
310 |
print $fh "\n"; |
|
311 |
print $fh "sub run {\n"; |
|
312 |
print $fh " my (\$self) = \@_;\n"; |
|
313 |
print $fh "\n"; |
|
314 |
print $fh "}\n"; |
|
315 |
print $fh "\n"; |
|
316 |
print $fh "1;\n"; |
|
317 |
} |
|
318 |
|
|
302 | 319 |
close $fh; |
303 | 320 |
|
304 | 321 |
print "File $full_filename created.\n"; |
Auch abrufbar als: Unified diff
scripts/dbupgrade2_tool.pl: bei --create --type pl auch package stub anlegen