[Catalyst] transforming empty values in request to perl's undef

Rajesh Kumar Mallah mallah at redgrape.tech
Thu Mar 2 15:25:27 GMT 2017


Hi ,

I want to transform request parameters in GET & POST requests
so that any thing which is empty (string) gets converted/replaced
my perl's undef (and DBIC's NULL).

Why i need that:
====================
I have edit form in my web app and some fields in the edit form
are prefilled with nothing. On submission the DB raises an exception
that an empty string is being inserted to a integer field.

Hence I feel like having a global filter that turns all blanks to
undef.

The question is where to put this global filter.

Regds
mallah.






More information about the Catalyst mailing list