Thanks, It helps.
regds
Mallah.
> It's just a package and I have in make_schema_at.pl to apply the
> components
> that I want to use:
>
> make_schema_at(
> "My::Schema::${class_name}",
> {
> exclude => qr/_\d+$/,
> dump_directory=> "$Bin/../lib",
>
It's just a package and I have in make_schema_at.pl to apply the components
that I want to use:
make_schema_at(
"My::Schema::${class_name}",
{
exclude => qr/_\d+$/,
dump_directory=> "$Bin/../lib",
components=> [ '+My::TraitFor::Result::ForceNULL',
Thanks for that , it looks elegant .
Could you please send some pointer to docs for Traits
approach.
regds
mallah.
> Not sure if that's the best way to do it or if it's a good approach, but I
> have a trait which is applied to all result classes.
>
> TraitFor::Result::ForceNULL;
> use
Not sure if that's the best way to do it or if it's a good approach, but I
have a trait which is applied to all result classes.
TraitFor::Result::ForceNULL;
use strict;
use warnings;
my $null = undef;
sub insert
{
my $self = shift;
for my $col ($self->columns) {
next unless defined
By empty i mean string with length 0 ie ''
__CODE__
I am posting to rest endpoint Automagically generated via
Catalyst::Controller::DBIC::API there is no explicit code hand
written by me.And that is why looking for a global filter.
There are three great virtues of a programmer; Laziness,
Hi
Are you by any chance using HTML::FormFu? If so, check the "ignore_if_empty"
option.
https://metacpan.org/pod/HTML::FormFu::Model::DBIC#Config-options-for-fields
If not, could you please show the code with which you're "receiving" the params
and inserting into the DB?
Just curious: when
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