Re: [Dbix-class] latest DBIx::Class "Not inlining a constructor..."
dear peter, (was on holydays the last week).. i did try the latest /current master, the warnings are gone on the testing -script :) when i start my Catalyst-Applikation, i get other/new message: /usr/local/BaseFrameWork/sites/MyApp/script/MyApp.psgi: Schema MyApp::Schema=HASH(0xced96e0) failed the 'valid_c3_composition' sanity check: Class 'MyApp::Schema::ResultSet::Attachment' was originally using the 'dfs' MRO affecting the lookup order of the following method(s): BUILDARGS(), DESTROY(), meta(), new(). You MUST add the following line to 'MyApp::Schema::ResultSet::Attachment' right after strict/warnings: use mro 'c3'; /usr/local/BaseFrameWork/sites/MyApp/script/MyApp.psgi: Schema MyApp::Schema=HASH(0xced96e0) failed the 'valid_c3_composition' sanity check: Class 'MyApp::Schema::ResultSet::Page' was originally using the 'dfs' MRO affecting the lookup order of the following method(s): BUILDARGS(), DESTROY(), meta(), new(). You MUST add the following line to 'MyApp::Schema::ResultSet::Page' right after strict/warnings: use mro 'c3'; /usr/local/BaseFrameWork/sites/MyApp/script/MyApp.psgi: Schema MyApp::Schema=HASH(0xced96e0) failed the 'valid_c3_composition' sanity check: Class 'MyApp::Schema::ResultSet::Users' was originally using the 'dfs' MRO affecting the lookup order of the following method(s): BUILDARGS(), DESTROY(), meta(), new(). You MUST add the following line to 'MyApp::Schema::ResultSet::Users' right after strict/warnings: These 3 ResutSet are the ones that are inherited from my BaseFrameWork. If i add use mro 'c3'; to the 3 classes in my applikation directly after use Moose; the warnings are gone, and the application runs fine :) do you know, when DBIC will be released including the moose-fix ? thanks for yourr support!! cheers, berni > On 30 Sep 2016, at 12:48, Peter Rabbitson <rabbit+d...@rabbit.us> wrote: > > On 09/19/2016 02:14 PM, Bernhard Bauch wrote: >> dear peter, >> >> here's my example code..(see attachment) > > Sorry for the delayed response. > > It seems that commit https://github.com/dbsrgits/dbix-class/commit/e1d9e578b8 > tickles some sort of bug within MooseX::NonMoose as demonstrated here: > https://github.com/doy/moosex-nonmoose/issues/15 > > The upcoming version of DBIC will not contain the line added in e1d9e578b8 as > per https://github.com/dbsrgits/dbix-class/commit/0c90b924 > > I have tried your example script with the current master ( > https://github.com/dbsrgits/dbix-class/commit/8aae7940 ) and it no longer > warns. > > Could you please try this (running against latest) and report back? > > Cheers! > > > ___ > 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:57ee4317170078726614985! > > — 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
Re: [Dbix-class] latest DBIx::Class "Not inlining a constructor..."
dear peter, any news on that ? cheers, berni > On 22 Sep 2016, at 08:27, Peter Rabbitson <rabbit+d...@rabbit.us> wrote: > > On 09/21/2016 02:18 PM, Bernhard Bauch wrote: >> hey again, >> that does not change a thing :( >> >> any ideas peter what could be wrong in my classes/setup ? > > Sorry for not having replied yet - I am at a conference and time is scarce. I > will look into this in more detail tomorrow. > > Cheers > > > ___ > 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:57e379f3170074685396635! > > — 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
Re: [Dbix-class] latest DBIx::Class "Not inlining a constructor..."
hey again, that does not change a thing :( any ideas peter what could be wrong in my classes/setup ? cheers, berni > On 19 Sep 2016, at 15:49, Dmitry L. <dim0...@gmail.com> wrote: > > Maybe I'm wrong, but your base classes (MyBaseApp::*) are already > "moosified", so you don't have to use MooseX::NonMoose in subclasses > which extend your MyBaseApp::* > > On 19 September 2016 at 15:14, Bernhard Bauch <ba...@zsi.at> wrote: >> 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 >> >> >> >> >> >>> 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 >>> >>> >>> >>> >> >> — >> 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 >> >> >> >> >> >> ___ >> 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 > > > > -- > //wbr, Dmitry L. > > ___ > 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:57dfecf8170071878036111! > > — 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
Re: [Dbix-class] latest DBIx::Class "Not inlining a constructor..."
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: ir
Re: [Dbix-class] latest DBIx::Class "Not inlining a constructor..."
dear all, i did upgrade all modules (installed from scratch all catalyst, dbix:class, etc. modules -- so also moose) my dbix::class schema/resultset structure looks like this: package CatalystX::MyBaseApp::Schema::ResultSet; use Moose; use namespace::autoclean; use MooseX::NonMoose; extends 'DBIx::Class::ResultSet'; sub BUILDARGS { $_[2] } custom code here.. __PACKAGE__->meta->make_immutable; 1; package MyApp::Schema::ResultSet; use Moose; use namespace::autoclean; use MooseX::NonMoose; extends 'CatalystX:: MyBaseApp::Schema::ResultSet'; sub BUILDARGS { $_[2] } __PACKAGE__->meta->make_immutable; 1; used versions: - perl 5.24.0 - dbix::class: 0.082840 - moose: 2.1805 hope that helps. chees, bernhard > On 14 Sep 2016, at 13:17, Peter Rabbitson <rabbit+d...@rabbit.us> wrote: > > On 09/14/2016 11:13 AM, Bernhard Bauch wrote: >> dear all, >> >> i've been updating to the latest dbix::class version yesterday, and now >> my catalyst app / more the dbix::class schema does not work.. > > In the emails you keep citing ...DBIx-Class-0.08271... yet the latest version > is 0.082840: https://metacpan.org/release/DBIx-Class > > It is also unclear whether it is *just* DBIC that you upgraded, or did you > upgrade the rest of your dependencies (i.e. did your version of Moose > before/after stayed the same? ) > > It would really help if you can narrow this down, by attempting to load just > a single result class (not your entire app/schema) and verifying if that > works before/after, while also comparing the versions of various libraries > using something like > https://metacpan.org/pod/Module::Versions::Report#SYNOPSIS > > Cheers > > > ___ > 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:57d931fb170071281829247! > > — 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
Re: [Dbix-class] latest DBIx::Class "Not inlining a constructor..."
hey again, correction: there are now errors. when i do > > http://search.cpan.org/~ribasushi/DBIx-Class-0.08271/lib/DBIx/Class/ResultSet.pm#CUSTOM_ResultSet_CLASSES_THAT_USE_Moose > > <http://search.cpan.org/~ribasushi/DBIx-Class-0.08271/lib/DBIx/Class/ResultSet.pm#CUSTOM_ResultSet_CLASSES_THAT_USE_Moose>for > all my resultset-classes but i receive lots of warnings (for every ResulSet class i have) when starti my app.. like > 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 anyideas why ? bye, bernhard > On 14 Sep 2016, at 11:13, Bernhard Bauch <ba...@zsi.at> wrote: > > dear all, > > i've been updating to the latest dbix::class version yesterday, and now my > catalyst app / more the dbix::class schema does not work.. > > i get the following error/warning when starting my App: > > > 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 > > > i did use moose in my ResultSet classes as descrived here: > > http://search.cpan.org/~ribasushi/DBIx-Class-0.08271/lib/DBIx/Class/ResultSet.pm#CUSTOM_ResultSet_CLASSES_THAT_USE_Moose > > <http://search.cpan.org/~ribasushi/DBIx-Class-0.08271/lib/DBIx/Class/ResultSet.pm#CUSTOM_ResultSet_CLASSES_THAT_USE_Moose> > > if i put > __PACKAGE__->meta->make_immutable( inline_constructor => 0 ); > > at the end of my packages, the warning disappears but its not working anyway. > > the following errors occure...e.g: > > "Can't call method "columns" on an undefined value at > /usr/local/DBIx/Class/ResultSet.pm line 3538 > or > Can't use an undefined value as a HASH reference at > /usr/local/.../DBIx/Class/ResultSet.pm line 477 > > > anyidea whats wrong here ? > > thanks for you support, > bernhard > > > > — > 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 <mailto:ba...@zsi.at> > Skype: berni-zsi > > > > > ___ > 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:57d914db170079883714898! — 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 <mailto: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
[Dbix-class] latest DBIx::Class "Not inlining a constructor..."
dear all, i've been updating to the latest dbix::class version yesterday, and now my catalyst app / more the dbix::class schema does not work.. i get the following error/warning when starting my App: 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 i did use moose in my ResultSet classes as descrived here: http://search.cpan.org/~ribasushi/DBIx-Class-0.08271/lib/DBIx/Class/ResultSet.pm#CUSTOM_ResultSet_CLASSES_THAT_USE_Moose <http://search.cpan.org/~ribasushi/DBIx-Class-0.08271/lib/DBIx/Class/ResultSet.pm#CUSTOM_ResultSet_CLASSES_THAT_USE_Moose> if i put __PACKAGE__->meta->make_immutable( inline_constructor => 0 ); at the end of my packages, the warning disappears but its not working anyway. the following errors occure...e.g: "Can't call method "columns" on an undefined value at /usr/local/DBIx/Class/ResultSet.pm line 3538 or Can't use an undefined value as a HASH reference at /usr/local/.../DBIx/Class/ResultSet.pm line 477 anyidea whats wrong here ? thanks for you support, bernhard — 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 <mailto: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
Re: [Dbix-class] dbix + perl5.18
Dear Peter, oh great to hear that. i skipped the upgrade-task a while ago(or better moved to the future), and did not touch things, since our last conversation. but the time will come within the next months to contiune the upgrade of modules-project. that means, right now, i cant test your fix. i'll try to get back my test-devel environment soon, and let you know if your fix, solved the problem. cherrz, bernhard On 24.01.14 09:33, Peter Rabbitson wrote: On Wed, Jun 12, 2013 at 03:42:20PM +0200, Bernhard Bauch wrote: dear dbix-folks, i just upgraded to the latest perl 5.18 and from that time i got problems with loading my dbix:class Schema errors for example look like this (only one at a time ..randomly): This is *finally* fixed in DBIC 0.08250_0*. If you are still on this project please test the latest devrel to make sure it solves your problem: https://metacpan.org/release/RIBASUSHI/DBIx-Class-0.08250_06 https://twitter.com/dbix_class/status/426621707843948546 Cheers ___ 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:52e289f016543634715495! -- Bernhard Bauch, Webdevelopment ZSI - Zentrum für soziale Innovation ba...@zsi.at Skype: berni-zsi signature.asc Description: OpenPGP digital signature ___ 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
[Dbix-class] dbix + perl5.18
dear dbix-folks, i just upgraded to the latest perl 5.18 and from that time i got problems with loading my dbix:class Schema errors for example look like this (only one at a time ..randomly): {UNKNOWN}: {UNKNOWN}: {UNKNOWN}: {UNKNOWN}: {UNKNOWN}: {UNKNOWN}: {UNKNOWN}: DBIx::Class::Relationship::BelongsTo::belongs_to(): Can't infer join condition for 'zone' on MyApp::Schema::Result::ZoneObject: Can't locate object method _pri_cols via package MyApp::Schema::Result::Zone at .perl5/DBIx/Class/Relationship/BelongsTo.pm line 29. at .../Schema/Result/ZoneObject.pm line 22 {UNKNOWN}: {UNKNOWN}: {UNKNOWN}: {UNKNOWN}: {UNKNOWN}: DBIx::Class::Relationship::BelongsTo::belongs_to(): Can't infer join condition for 'project' on MyApp::Schema::Result::ProjectStakeholder: Can't locate object method _pri_cols via package MyApp::Schema::Result::Object::Project at ./lib/perl5/DBIx/Class/Relationship/BelongsTo.pm line 29. at /../Schema/Result/ProjectStakeholder.pm line 20 {UNKNOWN}: {UNKNOWN}: {UNKNOWN}: {UNKNOWN}: {UNKNOWN}: {UNKNOWN}: {UNKNOWN}: {UNKNOWN}: Can't locate object method load_components via package MyApp::Schema::Result::Object::Project at ./Schema/Result/Object/Project.pm line 11. {UNKNOWN}: {UNKNOWN}: {UNKNOWN}: DBIx::Class::Relationship::BelongsTo::belongs_to(): Can't infer join condition for 'stakeholder' on MyApp::Schema::Result::StakeholderUsers: Can't locate object method _pri_cols via package MyApp::Schema::Result::Stakeholder at /lib/perl5/DBIx/Class/Relationship/BelongsTo.pm line 29. at ./Schema/Result/StakeholderUsers.pm line 21 the funny thing is, that sometimes it loads fine ... sometimes one of the erros occure. i figured out where the problem is! since perl 5.18 hash-ramdomizatiomn is used see: https://metacpan.org/module/RJBS/perl-5.18.0/pod/perldelta.pod#Hash-randomization in DBIx::Class::Schema.pm line 232: my %results = $class-_map_namespaces(@$result_namespace); an ordered list of result classes is stored in an hash later in line242: for my $res (values %results) { $class-ensure_class_loaded($res); this hash is used the error ist, that values return a randomly sorted list now ... the correct order coming from $class-_map_namespaces(@$result_namespace); is neglected. this was my workaround-fix --- diff Schema.pm_fix Schema.pm 235,241d234 # correct order !!! my @result_classes; foreach my $class ( $class-_map_namespaces(@$result_namespace) ){ push (@result_classes, $class) if $class =~ /Schema::Result/; } 249,250c242 #for my $res (values %results) { for my $res ( @result_classes ) { --- for my $res (values %results) { --- maybe this should be fixed in upcoming DBIx::Class releases ? cheers, berni -- Bernhard Bauch, Webdevelopment ZSI - Zentrum für soziale Innovation ba...@zsi.at Skype: berni-zsi ___ 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
Re: [Dbix-class] dbix + perl5.18
On 12.06.2013, at 16:17, Peter Rabbitson wrote: On Wed, Jun 12, 2013 at 03:42:20PM +0200, Bernhard Bauch wrote: dear dbix-folks, ... i figured out where the problem is! since perl 5.18 hash-ramdomizatiomn is used see: https://metacpan.org/module/RJBS/perl-5.18.0/pod/perldelta.pod#Hash-randomization in DBIx::Class::Schema.pm line 232: my %results = $class-_map_namespaces(@$result_namespace); an ordered list of result classes is stored in an hash This can't be true - _map_namespaces returns a list, without any kind of order (it's Filesystem order). Even if it did - the order would not be preserved on older perls either, after the hash assignment. oh sorry- i mis-read the code -- i thought _map_namespace provides an ordred list of modules (the order in which the modules need to be loaded) the order of the list (returned by $class-_map_namespaces(@$result_namespace) ) is always the same (not changing on reload/restart/compile) and my class load/run fine with that. but this : my %res ults = $class-_map_namespaces(@$result_namespace); for my $res (values %results) { print class: $res; } shows a different order every time... later in line242: for my $res (values %results) { $class-ensure_class_loaded($res); this hash is used the error ist, that values return a randomly sorted list now ... the correct order coming from $class-_map_namespaces(@$result_namespace); is neglected. this was my workaround-fix --- diff Schema.pm_fix Schema.pm 235,241d234 # correct order !!! my @result_classes; foreach my $class ( $class-_map_namespaces(@$result_namespace) ){ push (@result_classes, $class) if $class =~ /Schema::Result/; } 249,250c242 #for my $res (values %results) { for my $res ( @result_classes ) { --- for my $res (values %results) { --- This can't be the correct fix due to reasons described above. Something else is happening that prevents a *specific class* requiring its far-relationship side. Please provide several definitions of the adected classes (both the ones that throw an exception, and the ones whose load fails). this is the ordered class list returned by $class-_map_namespaces(@$result_namespace); loading: Newindigo::Schema::Result::Attachment loading: Newindigo::Schema::Result::Startpage loading: Newindigo::Schema::Result::Settings loading: Newindigo::Schema::Result::Object loading: Newindigo::Schema::Result::Zone loading: Newindigo::Schema::Result::Users loading: Newindigo::Schema::Result::UsersRole loading: Newindigo::Schema::Result::Page loading: Newindigo::Schema::Result::Country loading: Newindigo::Schema::Result::Stakeholder loading: Newindigo::Schema::Result::Role loading: Newindigo::Schema::Result::StakeholderUsers loading: Newindigo::Schema::Result::ZoneObject loading: Newindigo::Schema::Result::AttachmentBase loading: Newindigo::Schema::Result::Tag loading: Newindigo::Schema::Result::TagObject loading: Newindigo::Schema::Result::ProjectStakeholder loading: Newindigo::Schema::Result::Object::Project my Packages + inhertiance (for Newindigo::Schema::Result::Object::Project) look like this . (all other class above inherit from Newindigo::Schema::Result) package Newindigo::Schema::Result::Object::Project; use utf8; use Moose; use MooseX::NonMoose; use MooseX::MarkAsMethods autoclean = 1; extends 'Newindigo::Schema::Result::Object'; package Newindigo::Schema::Result::Object; use Moose; use namespace::autoclean; extends 'Newindigo::Schema::Result'; . package Newindigo::Schema::Result; use Moose; use namespace::autoclean; extends 'CatalystX::SEAC::Schema::Result'; . package CatalystX::SEAC::Schema::Result; use Moose; use MooseX::NonMoose; use namespace::autoclean; extends 'DBIx::Class::Core'; . need/want more infos ? thanks, bye, bernhard maybe this should be fixed in upcoming DBIx::Class releases ? It should definitely be fixed, but first the real problem must be identified ;) Cheers ___ 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 -- Bernhard Bauch, Webdevelopment ZSI - Zentrum für soziale Innovation ba...@zsi.at Skype: berni-zsi ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http
Re: [Dbix-class] dbix + perl5.18
sorry its not on a repository ... its kind of a PRISM CIA top secret project .. no ..i can send a tar/ball/gz will all reladed classes../packages there alot.. directly to your email .. or on the list ? thanks! On 12.06.2013, at 16:44, Peter Rabbitson wrote: On Wed, Jun 12, 2013 at 04:34:00PM +0200, Bernhard Bauch wrote: need/want more infos ? Yes - I need the relationship definitions between classes as well - this is where your exception is occuring. A class is allowed to load another class, *outside* of the Schema.pm codeflow. This is where the problem lies, Schema.pm has nothing to do with it. If this codebase is available somewhere in a repository I can just look there as well. Cheers ___ 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 -- Bernhard Bauch, Webdevelopment ZSI - Zentrum für soziale Innovation ba...@zsi.at Skype: berni-zsi ___ 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
Re: [Dbix-class] dbix + perl5.18
and actually.. i got (another?) inheritance problemregarding the inheritance of ResultSet Classes.. maybe it makes sens to describe the problem, when i send you the bunch of classes (cleaned up ... because some are full of useless and confusing crapi know ..send full code ...) ..tomorrow...have a good day. On 12.06.2013, at 16:44, Peter Rabbitson wrote: On Wed, Jun 12, 2013 at 04:34:00PM +0200, Bernhard Bauch wrote: need/want more infos ? Yes - I need the relationship definitions between classes as well - this is where your exception is occuring. A class is allowed to load another class, *outside* of the Schema.pm codeflow. This is where the problem lies, Schema.pm has nothing to do with it. If this codebase is available somewhere in a repository I can just look there as well. Cheers ___ 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 -- Bernhard Bauch, Webdevelopment ZSI - Zentrum für soziale Innovation ba...@zsi.at Skype: berni-zsi ___ 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
[Dbix-class] bug or misuse of $schema-register_class after upgrade ?
dear dbix::class list, i just tried upgrading my dbix::class from 0.08123 to the lastest 0.08127. but some things not working right... i am using catalyst with dbix::class. in my App.pm after __PACKAGE__-setup(); depending on config-files, i dynamically add some relations to some result-classes. this worked fine with version 0.8123, but its not working as it should with the lastest version. how i add a many2many relation after setup looks like this.. my $myclass = $schema-class(Someclass); $myclass-has_many(linktable_accessor, MyApp::Schema::Result::Linktable , 'link_id', ); $myclass-many_to_many(accessor, linktable_accessor , 'accessor', ); $schema-unregister_source(Someclass); $schema-register_class(SomeClass , $myclass); (the results for linktable and foreignclass are well defined) after the upgrade ... this is not working. the hasmany accessor and many2many accessors are not available for row-items.. (Can't locate object method ...) if i put the two 2 statements (-has_many ... and many_to_many) in my the Result::Someclass module , dbix::class warnings appear, that some functions have already been defined. (eg. add_to_..) asking the result for available relations with -relationships, the linktable_accessor appears, but can not be accessed from a row-item. i tried to find the difference between the 2 versions...and i figured out what part of the code is the responsible for this .. in DBIx/Class/Schema.pm in line #925 this was added: weaken ${${target_class}::__cag_result_source_instance}; if i remove this line, everything is working like expected or like before. what can i do to keep my code working ? any ideas ? thanks alot for help, bernhard -- Bernhard Bauch, Webdevelopment ZSI - Zentrum für soziale Innovation ba...@zsi.at ___ 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
[Dbix-class] resultsource classdata
hey dbixclass-list, i'm looking for something like having classdata for dbix-class resultset classes. of course if can have classdata available in my schema eg. like package MyApp::Schema; use Moose; use namespace::autoclean; BEGIN { extends 'DBIx::Class::Schema' }; has 'sometest' = (is = 'rw' ); but i need classdata related to the resultsource class. like this: package MyApp::Schema::Result; use Moose; use namespace::autoclean; BEGIN { extends 'DBIx::Class::Core' }; __PACKAGE__-mk_classdata('asometest'); __PACKAGE__-sometest(123); trying to access this ends up in this: $row-sometest (= is 123); $row-result_source-sometest (= does not exist) sometest is available from a row object. but i need sometest to be avaialble from result_source. any ideas how to get this working ? lots of thank yous, bye, bernhard Bernhard Bauch, Webdevelopment ZSI - Zentrum für soziale Innovation ba...@zsi.at ___ 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