[Dbix-class] Can't locate object method "in_storage" via package "Math::BigInt"

Robert Stone drzigman at drzigman.com
Wed Jan 4 23:00:03 GMT 2017


Greetings,

Can you share the full DBIx::Class::Schema file?

It sounds like you have some inflation/deflation going on, similar to what
happens to DateTime objects and datetime types if you include:

__PACKAGE__->load_components(qw/InflateColumn::DateTime/);

If this is affecting all of your columns with a type of bigint and
something is causing that to get inflated to a Math::BigInt object it would
explain the errors and behavior you are seeing.

Also, is it correct to assume that $inode in your example is a
DBIx::Result?  If so, be sure to reference via the public interface
$inode->owner->id instead of via the "private-ish" HashRef.

Best Regards,
Robert Stone

On Wed, Jan 4, 2017 at 4:42 PM, Alex Povolotsky <tarkhil at over.ru> wrote:

> Things are getting more and more strange.
>
> Attempt to isolate code failed; simple one-liner works.
>
> $inode->{owner}->{id} from the original code is not an object.
>
> In fact, problem was in different line, where plain status => 1 somehow
> turned into          'status' => bless( {
>                                'sign' => '+',
>                                'value' => [
>                                             1
>                                           ]
>                              }, 'Math::BigInt' ),
>
> I have no idea of how can it be...
>
>
> On 05.01.2017 0:12, Alex Povolotsky wrote:
>
>> Yes; moreover, from different computer the code
>>
>> my $owner = $schema->resultset('InstaPerson')->find_or_create( {
>>
>> insta_id => 178873658,
>>                                                                },
>>                                                                {
>>                                                                 key =>
>> 'instabot_instagram_id_idx' },
>>                                                              );
>>
>> works just fine. Same version of DBIx::Class.
>>
>> I've tried to copy Result file for InstaPerson, no success.
>>
>> On 05.01.2017 0:07, Len Jaffe wrote:
>>
>>>
>>> On Wed, Jan 4, 2017 at 3:58 PM, Alex Povolotsky <tarkhil at over.ru
>>> <mailto:tarkhil at over.ru>> wrote:
>>>
>>>     Suddenly I'm unable to insert data into my table.
>>>     [snip]
>>>
>>>
>>> Can you insert data via the command line?
>>>
>>> --
>>> Len Jaffe - Information Technology Smoke Jumper
>>> - lenjaffe at jaffesystems.com <mailto:lenjaffe at jaffesystems.com>
>>> 614-404-4214    @LenJaffe <https://www.twitter.com/lenJaffe>
>>>  www.lenjaffe.com <http://www.lenjaffe.com/>
>>> Host of Code Jam Columbus <http://www.meetup.com/techlifecolumbus/>  -
>>> @CodeJamCMH <https://www.twitter.com/CodeJamCMH>
>>> Curator of Advent Planet <http://www.lenjaffe.com/AdventPlanet/> - An
>>> Aggregation of Online Advent Calendars.
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>> _______________________________________________
>> 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
>>
>>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20170104/509412fb/attachment-0001.htm>


More information about the DBIx-Class mailing list