Use strict and all warnings. Fix warnings that this triggers.
[pspp-builds.git] / src / language / expressions / parse.inc.pl
index bab06d24517a423502e5ac0b7ffa3e5a61382aa0..4e7243c16086b8c8efb0d1e6c6ce2f36c13c4ee2 100644 (file)
@@ -1,4 +1,8 @@
+use strict;
+use warnings 'all';
+
 do 'generate.pl';
+our (@types, @order, %ops);
 
 sub generate_output {
     my (@members) = ("\"\"", "\"\"", 0, 0, 0, "{}", 0, 0);
@@ -7,7 +11,10 @@ sub generate_output {
     for my $type (@types) {
        next if $type->{ROLE} eq 'fixed';
 
-       my (@members) = ("\"$type->{NAME}\"", "\"$type->{HUMAN_NAME}\"",
+       my ($human_name) = $type->{HUMAN_NAME};
+       $human_name = "" if !defined $human_name;
+       
+       my (@members) = ("\"$type->{NAME}\"", "\"\"",
                         0, "OP_$type->{NAME}", 0, "{}", 0, 0);
        print "{", join (', ', @members), "},\n";
     }