[Dbix-class] I can't use two own components that use ResultSetManager.

atsushi kobayashi nekokak at gmail.com
Tue Mar 14 13:43:32 CET 2006


Hi.

I can't use two own components that use ResultSetManager.

ex:

package DBIx::Class::Foo;
use strict;
use base qw/DBIx::Class/;

__PACKAGE__->load_components(qw/ResultSetManager/);

sub foo : ResultSet {
}

1;

package DBIx::Class::Bar;
use strict;
use base qw/DBIx::Class/;

__PACKAGE__->load_components(qw/ResultSetManager/);

sub bar : ResultSet {
}

1;

package DBIC::Test;
use strict;
use base 'DBIx::Class';

__PACKAGE__->load_components(qw/Foo Bar PK::Auto::SQLite Core/);

1;

my $schema = DBIC->connect(...);
my $it;
$it = $schema->resultset('Test')->foo(); # ok
$it = $schema->resultset('Test')->bar(); # not ok


The ResultSet attribute exist in the method of the foo.
But the ResultSet attribute doesn't exist in the method of the bar.

Is my usage wrong?

atsushi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/dbix-class/attachments/20060314/429523ed/attachment.htm 


More information about the Dbix-class mailing list