[Dbix-class] numeric field returned with quotes

Dmitry L. dim0xff at gmail.com
Fri Apr 17 15:54:38 GMT 2015


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@lists.scsys.co.uk



-- 
//wbr, Dmitry L.



More information about the DBIx-Class mailing list