Skip Menu |

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

Report information
The Basics
Id: 53599
Status: resolved
Priority: 0/
Queue: DBIx-Class-FrozenColumns

People
Owner: Nobody in particular
Requestors: andrey [...] kostenko.name
Cc:
AdminCc:

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



Subject: broken DBIx::Class::Row is_changed object method
If row has modified columns, is_changed method returns true. But if row has no changes, is_changed dies. I've found bug, patch was attached.
Subject: is_changed.patch
diff -ru DBIx-Class-FrozenColumns-0.08/lib/DBIx/Class/FrozenColumns.pm DBIx-Class-FrozenColumns-0.09/lib/DBIx/Class/FrozenColumns.pm --- DBIx-Class-FrozenColumns-0.08/lib/DBIx/Class/FrozenColumns.pm 2009-07-01 11:09:00.000000000 +0400 +++ DBIx-Class-FrozenColumns-0.09/lib/DBIx/Class/FrozenColumns.pm 2010-01-11 19:02:40.000000000 +0300 @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = 0.08; +our $VERSION = 0.09; __PACKAGE__->mk_group_accessors(inherited => qw/_frozen_columns _dirty_frozen_columns/); __PACKAGE__->_frozen_columns({}); @@ -353,7 +353,7 @@ return @columns; } - return 1 if $self->next::method(@_) or keys %{$self->_dirty_frozen_columns}; + return 1 if $self->next::method(@_) or keys %{$self->_dirty_frozen_columns||{}}; } =head2 update diff -ru DBIx-Class-FrozenColumns-0.08/t/05frozen.t DBIx-Class-FrozenColumns-0.09/t/05frozen.t --- DBIx-Class-FrozenColumns-0.08/t/05frozen.t 2009-07-01 11:05:43.000000000 +0400 +++ DBIx-Class-FrozenColumns-0.09/t/05frozen.t 2010-01-11 19:01:28.000000000 +0300 @@ -5,7 +5,7 @@ use lib 't/lib'; use FrozenTest; -plan tests => 25; +plan tests => 27; my $schema = FrozenTest->init; my $rs = $schema->resultset('Source'); @@ -22,8 +22,9 @@ $row->$acc("acc_$t"); is $row->$acc, "acc_$t", "$t: accessor"; } - +ok $row->is_changed; $row->update; +ok !$row->is_changed; $row = $rs->find({id => $id}); $rs->create({ id => ++$id,
Subject: Re: [rt.cpan.org #53599] broken DBIx::Class::Row is_changed object method
Date: Tue, 12 Jan 2010 13:47:11 +0300
To: bug-DBIx-Class-FrozenColumns [...] rt.cpan.org
From: Oleg Pronin <syber.rus [...] gmail.com>
применил, закачал, спасибо за багфикс :-) 2010/1/11 Andrey Kostenko via RT <bug-DBIx-Class-FrozenColumns@rt.cpan.org>: Show quoted text
> Mon Jan 11 11:14:40 2010: Request 53599 was acted upon. > Transaction: Ticket created by GUGU >       Queue: DBIx-Class-FrozenColumns >     Subject: broken DBIx::Class::Row is_changed object method >   Broken in: (no value) >    Severity: Critical >       Owner: Nobody >  Requestors: andrey@kostenko.name >      Status: new >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=53599 > > > > If row has modified columns, is_changed method returns true. > But if row has no changes, is_changed dies. I've found bug, patch was > attached. >