in reply to uninitialized value in numeric eq (==)

You can either change your code -
my($schema_in) = $_;
to this -
my($schema_in) = @_;
or this -
my $schema_in = shift;