Skip Menu |

This queue is for tickets about the Catalyst-Plugin-AutoCRUD CPAN distribution.

Report information
The Basics
Id: 74320
Status: resolved
Priority: 0/
Queue: Catalyst-Plugin-AutoCRUD

People
Owner: Nobody in particular
Requestors: martin.rusko [...] gmail.com
Cc:
AdminCc:

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



Subject: missing method columns_info with DBIx::Class older than 0.08125
Hi Oliver, I'm not sure if you have any intention to let AutoCRUD work with older DBIx::Class versions, but if you od it won't work with DBIx::Class not having 'columns_info' method (like 0.08123 present in current stable Debian/Squeeze). Attached is patch to use methods 'columns' and 'column_info' instead with older versions. Cheers, Martin
Subject: columns_info.patch
--- AccessorDisplayName.pm.orig 2012-01-24 07:31:46.587916985 +0100 +++ AccessorDisplayName.pm 2012-01-24 07:36:00.619915836 +0100 @@ -22,7 +22,13 @@ my $sqlt_tbl = $sqlt->get_table($from) or die "mismatched (accessor) table name between SQLT and DBIC: [$tbl_name]\n"; - my $columns_info = $source->columns_info; + # ->columns_info method is not available before DBIx::Class 0.08125 + my $columns_info = {}; + if ($DBIx::Class::VERSION >= 0.08125) { + $columns_info = $source->columns_info; + } else { + $columns_info = { map { $_ => $source->column_info($_) } $source->columns }; + } foreach my $field (keys %$columns_info) { next unless exists $columns_info->{$field}->{accessor} --- DynamicDefault.pm.orig 2012-01-24 07:16:26.495917127 +0100 +++ DynamicDefault.pm 2012-01-24 07:36:30.734118669 +0100 @@ -23,7 +23,13 @@ my $sqlt_tbl = $sqlt->get_table($from) or die "mismatched (dyn-update) table name between SQLT and DBIC: [$tbl_name]\n"; - my $columns_info = $source->columns_info; + # ->columns_info method is not available before DBIx::Class 0.08125 + my $columns_info = {}; + if ($DBIx::Class::VERSION >= 0.08125) { + $columns_info = $source->columns_info; + } else { + $columns_info = { map { $_ => $source->column_info($_) } $source->columns }; + } foreach my $field (keys %$columns_info) { next unless exists $columns_info->{$field}->{dynamic_default_on_create}
On Tue Jan 24 07:09:18 2012, martin.rusko@gmail.com wrote: Show quoted text
> I'm not sure if you have any intention to let AutoCRUD work with older > DBIx::Class versions, but if you od it won't work with DBIx::Class not > having 'columns_info' method (like 0.08123 present in current stable > Debian/Squeeze).
As per my other reply, I'm proposing 0.08127 and would appreciate your feedback. regards, oliver.
Subject: Re: [rt.cpan.org #74320] missing method columns_info with DBIx::Class older than 0.08125
Date: Tue, 24 Jan 2012 23:11:02 +0100
To: bug-Catalyst-Plugin-AutoCRUD [...] rt.cpan.org
From: Martin Rusko <martin.rusko [...] gmail.com>
Hi Oliver, also replied in another email, that it's fine with me. For my little needs it's fine to keep mixed stable/testing or stable/unstable system. Current testing and future stable release (Debian/Wheeze) contains already 0.08196. And before it becomes stable and can still have even newer version of DBIx::Class. Best Regards, Martin On Tue, Jan 24, 2012 at 8:40 PM, Oliver Gorwits via RT <bug-Catalyst-Plugin-AutoCRUD@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=74320 > > > On Tue Jan 24 07:09:18 2012, martin.rusko@gmail.com wrote:
>> I'm not sure if you have any intention to let AutoCRUD work with older >> DBIx::Class versions, but if you od it won't work with DBIx::Class not >> having 'columns_info' method (like 0.08123 present in current stable >> Debian/Squeeze).
> > As per my other reply, I'm proposing 0.08127 and would appreciate your feedback. > > regards, > oliver.
On Tue Jan 24 17:11:09 2012, martin.rusko@gmail.com wrote: Show quoted text
> Hi Oliver, > > also replied in another email, that it's fine with me. For my little > needs it's fine to keep mixed stable/testing or stable/unstable > system. Current testing and future stable release (Debian/Wheeze) > contains already 0.08196. And before it becomes stable and can still > have even newer version of DBIx::Class.
Excellent, thanks for the quick reply. I'm a Debian user myself so glad I'm not overtaking them. I'm preparing the new CPAN release now... regards, oliver.