projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
12acbe5
)
restore black magic
author
jeff
<jeff>
Wed, 8 Sep 2010 21:33:44 +0000
(21:33 +0000)
committer
jeff
<jeff>
Wed, 8 Sep 2010 21:33:44 +0000
(21:33 +0000)
bin/generate-table-module
patch
|
blob
|
history
diff --git
a/bin/generate-table-module
b/bin/generate-table-module
index
16a23e5
..
e7fc992
100755
(executable)
--- a/
bin/generate-table-module
+++ b/
bin/generate-table-module
@@
-1,7
+1,11
@@
#!/usr/bin/perl
#!/usr/bin/perl
+use strict;
+use vars qw( $opt_n );
use FS::Schema qw( dbdef_dist );
use FS::Schema qw( dbdef_dist );
+use Getopt::Std;
+getopts('n');
my $table = shift;
###
my $table = shift;
###
@@
-69,12
+73,9
@@
close DEST;
# add to FS/FS/Mason.pm
###
# add to FS/FS/Mason.pm
###
-# it needs to be:
-# 1. disablable (have an option to turn it off)
-# 2. documented in the schema change docs
-#
-#my $magic = '# Sammath Naur';
-#system("perl -pi -e 's/$magic/use FS::$table;\n $magic/' FS/FS/Mason.pm");
+my $magic = '# Sammath Naur';
+system("perl -pi -e 's/$magic/use FS::$table;\n $magic/' FS/FS/Mason.pm")
+ unless $opt_n;
###
# add FS/t/table.t
###
# add FS/t/table.t