Re: [Catalyst] add components to files generated by C::Helper::Model::DBIC::Schema
On Mon, Feb 04, 2008 at 08:18:27PM +0100, Moritz Onken wrote: Hi, I need to add some components to some packages created by Catalyst::Helper::Model::DBIC::Schema. Which uses DBIx::Class::Schema::Loader so this question would have been better asked on the DBIC list, but never mind. I tried adding them under the md5 checksum so updates wont break, but some of them needed to be placed before Core is loaded. Why? No component I've ever written requires that. No component I've ever used requires that. Doing an extra __PACKAGE__-load_components at the bottom of the file is equivalent to adding the contents of that call in front of core in the original load_components - why won't that work? Did you even try it? :) -- 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/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] add components to files generated by C::Helper::Model::DBIC::Schema
On Tue, Feb 05, 2008 at 11:18:46AM +0100, Moritz Onken wrote: sure I tried. Try InflateColumn::DateTime which overwrites the register_column method. It only works if it's loaded before Core. Which is what you'd be doing with a second load_components call, which is why I asked. The -actual- problem is that it needs to be loaded before the *add_columns* call. If you'd described the symptoms rather than guessing at the disease we could have solved your problem by now. Anyway, as John said - use a BEGIN block. That'll make the load_components call run before add_columns (note that you'll need to include Core in it since the first load_components won't have run yet iehter). -- 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/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] add components to files generated by C::Helper::Model::DBIC::Schema
Hi, I need to add some components to some packages created by Catalyst::Helper::Model::DBIC::Schema. I tried adding them under the md5 checksum so updates wont break, but some of them needed to be placed before Core is loaded. I didn't find anything about this in the docs. Any help? Thanks in advance, Moritz ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] add components to files generated by C::Helper::Model::DBIC::Schema
* On Mon, Feb 04 2008, Moritz Onken wrote: Hi, I need to add some components to some packages created by Catalyst::Helper::Model::DBIC::Schema. I tried adding them under the md5 checksum so updates wont break, but some of them needed to be placed before Core is loaded. I didn't find anything about this in the docs. Any help? Well, BEGIN{} blocks run before anything else in the file (other than BEGIN blocks or use ... statements). Regards, Jonathan Rockway ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/