Re: [Catalyst] Any chance there is an arbitrary limit to how many classes you can load this way...?
On Tue, Oct 09, 2007 at 04:41:02PM -0500, Jonathan Rockway wrote: FWIW, this is going to burn users of View::Template::Declare also. Given YourApp::View::TD and a templates like YourApp::View::TD::*, set: YourApp-config( default_view = qw/View::TD$/ ); and *NOT*: YourApp-config( default_view = 'View::TD'); No! -config(default_view = 'TD'); Remember, the default_view arg is -what you pass to $c-view-. Which means no MyApp::View:: -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Directorhttp://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/http://www.shadowcat.co.uk/servers/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Any chance there is an arbitrary limit to how many classes you can load this way...?
Am 09.10.2007 um 11:51 schrieb Dustin Suchter: So let's assume I have the below code. Each of the 13 classes represent 1 table in the same MySQL db. All class definitions are essentially identical in structure and have nothing more complex than foreign keys in them. Here's the weird thing, if I run my code with all 13 classes, my default view stops working - it seems to be replaced with the only other view I've defined! I only use the other one by manually calling 'forward' to it in 1 function - ultra weird! If I remove any of the classes the load_classes line the behavior goes back to expected. I've tried lots of reordering, renaming, removing, etc etc. I actually have far more than 13 classes I want to load, so I've even tried interchanging which 13 I test with. As far as I can tell, loading more than 12 classes at a time here causes some sort of buffer overflow that ends up messing with my views. That really doesn't make any sense to me, but it is what I'm observing. Also, I notice that in the debug output when starting my server, both my views are present at all times, so it's not like the secondary view is getting used because the default one is missing. However, if I delete the class defining my secondary view then my default view starts working again. This seems to imply that having more than 12 classes loaded in my Model somehow changes my default view order...?! umm... help? =] ### package MyAppDB; use base qw/DBIx::Class::Schema/; __PACKAGE__-load_classes({ MyAppDB = [qw/One Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve Thirteen/] }); ### hmm, I had the exact same situation (although the number of classes was somewhat higher, aprox. 25) when I used Catalyst::Action::RenderView::ErrorHandler I removed it and my app worked again. maybe this helps... josef ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Any chance there is an arbitrary limit to how many classes you can load this way...?
The fact that someone else had this problem makes me feel a tiny bit better. At least I'm not *totally* insane. I'm not explicitly using that package though: -bash-3.00$ grep ErrorH `find . -name *` -bash-3.00$ grep RenderView `find . -name *` | grep -v svn ./Makefile.PL:requires 'Catalyst::Action::RenderView'; ./lib/MyApp/Controller/Root.pm:sub end : ActionClass('RenderView') {} -bash-3.00$ Josef Chladek wrote: Am 09.10.2007 um 11:51 schrieb Dustin Suchter: So let's assume I have the below code. Each of the 13 classes represent 1 table in the same MySQL db. All class definitions are essentially identical in structure and have nothing more complex than foreign keys in them. Here's the weird thing, if I run my code with all 13 classes, my default view stops working - it seems to be replaced with the only other view I've defined! I only use the other one by manually calling 'forward' to it in 1 function - ultra weird! If I remove any of the classes the load_classes line the behavior goes back to expected. I've tried lots of reordering, renaming, removing, etc etc. I actually have far more than 13 classes I want to load, so I've even tried interchanging which 13 I test with. As far as I can tell, loading more than 12 classes at a time here causes some sort of buffer overflow that ends up messing with my views. That really doesn't make any sense to me, but it is what I'm observing. Also, I notice that in the debug output when starting my server, both my views are present at all times, so it's not like the secondary view is getting used because the default one is missing. However, if I delete the class defining my secondary view then my default view starts working again. This seems to imply that having more than 12 classes loaded in my Model somehow changes my default view order...?! umm... help? =] ### package MyAppDB; use base qw/DBIx::Class::Schema/; __PACKAGE__-load_classes({ MyAppDB = [qw/One Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve Thirteen/] }); ### hmm, I had the exact same situation (although the number of classes was somewhat higher, aprox. 25) when I used Catalyst::Action::RenderView::ErrorHandler I removed it and my app worked again. maybe this helps... josef ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Any chance there is an arbitrary limit to how many classes you can load this way...?
Why yes they are! There are classes like, 'User' and 'UserRoles'. This overlap happens a few time, actually. Can you elaborate on your solution? I'm a YAML beginner... Juan Miguel Paredes wrote: On 10/9/07, Dustin Suchter [EMAIL PROTECTED] wrote: The fact that someone else had this problem makes me feel a tiny bit better. At least I'm not *totally* insane. I once had a similar problem... not related to Views, but authentication, when defining about 20 classes in Schema, using DBIC::Schema. The problem, IIRC, was related to the regex searching at $c-comp('Foo') magic (search the list archive). In the end, it wasn't the number of loaded classes, but similarities on their names, when a class contained part of the name of another (e.g. Usuario, UsuarioInterno). In that case, simply adjusting the YAML configuration file worked (I had to change MyApp::Schema::MySchema::MyUserClass to MySchema::MyUserClass in myapp.yml). Are your schema classes following such a name scheme? Maybe not related, but just in case... :) ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/