CC: | roman.daniel [...] davosro.cz |
Subject: | sequence method doesnot work |
The sequence method on result class stopped working in DBIx::Class
0.08126 (worked in 0.08124). The simple class definition
package My::Table;
use strict;
use base qw(DBIx::Class::Core);
__PACKAGE__->table('mytable');
__PACKAGE__->add_columns(qw(col1 col2));
__PACKAGE__->set_primary_key('col1');
__PACKAGE__->sequence('mytable_seq');
1;
throws exception:
Can't locate object method "result_source" via package
"DBIx::Class::ResultSource::Table" at
/usr/local/share/perl5/DBIx/Class/ResultSource.pm line 636.
I guess there is a typo in DBIx::Class::ResultSource::sequence (was it
moved from other module?):
sub sequence {
my ($self,$seq) = @_;
#Carp::confess('ohoho');
my $rsrc = $self->result_source;
my @pks = $rsrc->primary_columns
or next;
$_->{sequence} = $seq
for values %{ $rsrc->columns_info (\@pks) };
}
and the $rsrc should be $self.