[Dbix-class] numeric field returned with quotes

Adam Witney awitney at sgul.ac.uk
Fri Apr 17 16:48:08 GMT 2015


Great, thanks, that did it!


> Try DBIx::Class::Helper::Row::NumifyGet
> 
> On 17 April 2015 at 18:44, Adam Witney <awitney at sgul.ac.uk> wrote:
> >
> > Hi,
> >
> > I have a numeric type field:
> >
> >   "gestation", { data_type => "numeric", is_nullable => 1 },
> >
> > but when I call the accessor I get a quoted number:
> >
> > use Data::Dumper;
> > die Dumper($self->gestation);
> >
> > $VAR1 = '31';
> >
> > This causes problem as when it gets turned into json, I get this
> >
> > { "gestation": "31"}
> >
> > But then the javascript front end complains when it tries to load it in an
> input[number] field
> >
> > Am I doing something wrong, or misunderstanding something?
> > Thanks
> >
> > Adam
> >
> > _______________________________________________
> > List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> > IRC: irc.perl.org#dbix-class
> > SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> > Searchable Archive: http://www.grokbase.com/group/dbix-
> class at lists.scsys.co.uk
> 
> 
> 
> --
> //wbr, Dmitry L.
> 
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/dbix-
> class at lists.scsys.co.uk



More information about the DBIx-Class mailing list