Skip Menu |

This queue is for tickets about the DBIx-Class-FrozenColumns CPAN distribution.

Report information
The Basics
Id: 114424
Status: rejected
Priority: 0/
Queue: DBIx-Class-FrozenColumns

People
Owner: Nobody in particular
Requestors: ribasushi [...] leporine.io
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Upcoming DBIC change will break this module entirely (PATCH attached)
The culprit is this DBIC-side change: https://github.com/dbsrgits/dbix-class/commit/096ab902a Please see comment in attached patch. Thank you!
Subject: 0001-Fix-for-upcoming-DBIx-Class-0.082900-release.patch
From c9cf3198cf3754180a833847ccfd379ddc2ce679 Mon Sep 17 00:00:00 2001 From: Peter Rabbitson <ribasushi@cpan.org> Date: Tue, 17 May 2016 09:50:12 +0200 Subject: [PATCH] Fix for upcoming DBIx::Class 0.082900 release This is not ideal, but neither is the way this module repurposes _column_data So far testing indicated this is the only module that did something similar, thus I am opting to not revert DBIC's behavior, but instead to patch your code If more failcases are discovered, it is not out of the question to simply revert 096ab902a within DBIC and institute a different way of handling things Sorry for the trouble :/ --- lib/DBIx/Class/FrozenColumns.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/DBIx/Class/FrozenColumns.pm b/lib/DBIx/Class/FrozenColumns.pm index f3672dd..daeff88 100644 --- a/lib/DBIx/Class/FrozenColumns.pm +++ b/lib/DBIx/Class/FrozenColumns.pm @@ -304,7 +304,17 @@ sub get_dirty_columns { sub _ensure_column_unpacked { my ($self, $column, $type) = @_; unless ( ref (my $packed = $self->get_column($column)) ) { - $self->store_column($column, $type->recover(\$packed)); + $self->store_column( + $column, + my $struct = $type->recover(\$packed) + ); + + # workaround for DBIx::Class::Row::store_column >= 0.082900 no longer + # allowing blessed refs in _column_data ( 096ab902a ) + # Ideally this needs to be rewritten to use a separate data stash + # just like e.g. DBIx::Class::FilterColumn does + $self->{_column_data}{$column} = $struct + if exists $self->{_column_data}{$column}; } } -- 2.1.4
On Tue May 17 09:53:22 2016, RIBASUSHI wrote: Show quoted text
> The culprit is this DBIC-side change: > https://github.com/dbsrgits/dbix-class/commit/096ab902a
After some days reflecting on this, I realized the DBIC change makes no sense whatsoever within the big picture. Please disregard this ticket, DBIC will be fixed so FrozenColumns will continue to work. Sorry for the noise
Чтв Май 19 04:32:39 2016, RIBASUSHI писал: Show quoted text
> On Tue May 17 09:53:22 2016, RIBASUSHI wrote:
> > The culprit is this DBIC-side change: > > https://github.com/dbsrgits/dbix-class/commit/096ab902a
> > After some days reflecting on this, I realized the DBIC change makes > no sense whatsoever within the big picture. Please disregard this > ticket, DBIC will be fixed so FrozenColumns will continue to work. > > Sorry for the noise
Oh thanks! i was planning to apply your fix today )
On Thu May 19 10:46:18 2016, SYBER wrote: Show quoted text
> > Oh thanks! i was planning to apply your fix today )
Yeah, here is the correct changeset if you are curious: https://github.com/dbsrgits/dbix-class/commit/59d017a#diff-0c1362c6dc5c3facf80b5e7b38c5c5ed I was too focused on a specific failcase when I wrote the incorrect version.