[Dbix-class] latest DBIx::Class "Not inlining a constructor..."

Bernhard Bauch bauch at zsi.at
Mon Sep 19 12:14:19 GMT 2016


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbix-debug.pl
Type: text/x-perl-script
Size: 1874 bytes
Desc: not available
URL: <http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20160919/140fb62f/attachment.bin>
-------------- next part --------------


> On 14 Sep 2016, at 15:29, Peter Rabbitson <rabbit+dbic at 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: bauch at zsi.at
Skype: berni-zsi




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20160919/140fb62f/attachment.pgp>


More information about the DBIx-Class mailing list