dear peter, here's my example code..(see attachment)
it produces the following errors on my setup: ---------- Not inlining a constructor for MyApp::Schema::ResultSet since its parent MyBaseApp::Schema::ResultSet doesn't contain a constructor named 'new'. If you are certain you don't need to inline your constructor, specify inline_constructor => 0 in your call to MyApp::Schema::ResultSet->meta->make_immutable Not inlining a constructor for MyApp::Schema::ResultSet::Foo since its parent MyApp::Schema::ResultSet doesn't contain a constructor named 'new'. If you are certain you don't need to inline your constructor, specify inline_constructor => 0 in your call to MyApp::Schema::ResultSet::Foo->meta->make_immutable DBIx::Class::Schema::source(): Can't find source for Foo at dbix-debug.pl line 107 ---------- have a nice day, bernhard
# ------------------ # MyBaseApp # ------------------ { package MyBaseApp::Schema; use Moose; use utf8; extends 'DBIx::Class::Schema'; } { package MyBaseApp::Schema::Result; use Moose; use MooseX::NonMoose; use namespace::autoclean; extends 'DBIx::Class::Core'; __PACKAGE__->table("base"); __PACKAGE__->add_columns("bar"); __PACKAGE__->meta->make_immutable; } { package MyBaseApp::Schema::ResultSet; use Moose; use namespace::autoclean; use MooseX::NonMoose; extends "DBIx::Class::ResultSet"; sub BUILDARGS { $_[2] } __PACKAGE__->meta->make_immutable; } # ------------------- # MyApp # ------------------- { package MyApp::Schema::ResultSet; use Moose; use namespace::autoclean; use MooseX::NonMoose; extends "MyBaseApp::Schema::ResultSet"; sub BUILDARGS { $_[2] } __PACKAGE__->meta->make_immutable; } { package MyApp::Schema::ResultSet::Foo; use Moose; use namespace::autoclean; use MooseX::NonMoose; extends "MyApp::Schema::ResultSet"; sub BUILDARGS { $_[2] } __PACKAGE__->meta->make_immutable; } { package MyApp::Schema::Result; use Moose; use namespace::autoclean; BEGIN { extends 'MyBaseApp::Schema::Result' }; __PACKAGE__->table("base2"); __PACKAGE__->add_columns("bar"); } { package MyApp::Schema::Result::Foo; use Moose; use namespace::autoclean; BEGIN { extends 'MyApp::Schema::Result' }; __PACKAGE__->table("foo"); __PACKAGE__->add_columns("bar"); } { package MyApp::Schema; use Moose; use namespace::autoclean; BEGIN { extends 'MyBaseApp::Schema' }; __PACKAGE__->load_namespaces( result_namespace => '+MyApp::Schema::Result', resultset_namespace => '+MyApp::Schema::ResultSet', default_resultset_class => '+MyApp::Schema::ResultSet', ); } my $q = MyApp::Schema->connect("dbi:SQLite::memory:")->resultset("Foo")->as_query; warn $$q->[0];
> On 14 Sep 2016, at 15:29, Peter Rabbitson <rabbit+d...@rabbit.us> wrote: > > On 09/14/2016 02:35 PM, Bernhard Bauch wrote: >> dear all, >> >> i did upgrade all modules (installed from scratch all catalyst, dbix:class, >> etc. modules -- so also moose) > > Right... that'll be more difficult to pinpoint. A simple set of classes > resembling your setup seems to work just fine for me with latest Moose and > stuff (see below). > > The best advice I can give at this point is to keep "trimming down" your > application ensuring the errors are present, and showing us a minimal example > that does not work for you. The way you have things presently - there are way > too many moving parts to attempt a remote diagnostic :/ > > perl -we ' > > { > package MyBaseApp::Schema::ResultSet::Foo; > > use Moose; > use namespace::autoclean; > use MooseX::NonMoose; > > extends "DBIx::Class::ResultSet"; > sub BUILDARGS { $_[2] } > > __PACKAGE__->meta->make_immutable; > } > > { > package MyBaseApp::Schema::Result::Foo; > > use base "DBIx::Class::Core"; > > __PACKAGE__->table("foo"); > __PACKAGE__->add_columns("bar"); > > __PACKAGE__->resultset_class("MyBaseApp::Schema::ResultSet::Foo"); > > } > > { > package MyBaseApp::Schema; > > use base "DBIx::Class::Schema"; > > __PACKAGE__->register_class( Foo => "MyBaseApp::Schema::Result::Foo"); > } > > my $q = > MyBaseApp::Schema->connect("dbi:SQLite::memory:")->resultset("Foo")->as_query; > warn $$q->[0]; > ' > > producing > > (SELECT me.bar FROM foo me) at -e line 37. > > > _______________________________________________ > List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class > IRC: irc.perl.org#dbix-class > SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ > Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk > > !DSPAM:57d950ba170071809073496! > > — Bernhard Bauch Webdevelopment ZSI-Zentrum für Soziale Innovation GmbH Centre for Social Innovation Linke Wienzeile 246, A-1150 Wien, Austria Mail: ba...@zsi.at Skype: berni-zsi
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk