ModelSEED/Model-SEED-core — Issue #101: NULL fields in database are returned as undefined in perl code
Author: samseaver
Created: 2011-11-17 05:38:59+00:00
State: open

If, for example, I were to call the enzyme column using a database object that is essentially a row from the 'reaction' table thus:

$rxn->enzyme()

and the enzyme field is NULL, then I get undefined. If the enzyme field is an empty string, then I get an empty string.

This may not mean much, but there are many string equalities being performed on these database objects, and if the function returns undefined, the string equality prints out an error like this one:

"Use of uninitialized value in string ne"

What would help avoid these errors springing up, as they are wont to do, if the database objects literally returned empty strings for NULL values in the database.