[DBIx-Class-Devel] [dbsrgits/dbix-class] Scalar::Defer support as column name (#98)

x86-64 notifications at github.com
Wed Mar 30 09:05:26 GMT 2016


So then using Scalar::Defer (or any other defer module) object as column name in search(), code call ref on it, in case of Scalar::Defer ref eq "0", and if we check length it will be == 1, so condition is false and it falls to "else" condition, which treat defer object as subject for serialize. However, serialize is using Storable::freeze, which has a line "logcroak "not a reference" unless ref($self);" and for defer object that is true, so it croaks.
I also tried to re-bless it into different package, not "0", but it only fails in different place instead. This looks like best solution for me, would be better if there was any certain way of knowing if object can be stringified and use that, but I don't see it yet.
You can view, comment on, or merge this pull request online at:

  https://github.com/dbsrgits/dbix-class/pull/98

-- Commit Summary --

  * Scalar::Defer support as column name

-- File Changes --

    M lib/DBIx/Class/Storage/DBIHacks.pm (2)

-- Patch Links --

https://github.com/dbsrgits/dbix-class/pull/98.patch
https://github.com/dbsrgits/dbix-class/pull/98.diff

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/dbix-class/pull/98
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20160330/3d4c1d5c/attachment.htm>


More information about the DBIx-Class-Devel mailing list