Andreas Dembach wrote:
> 1) I could not figure out how to get rid of the initial connect_info set
> by the ->config() call that Cat::DBIC::Schema seems to need during
> startup, which annoys a little since I do not have any configuration
> information during Apache startup.
Just don't set it, IIRC
> 2) I have to cache the schema for each database source, otherwise the
> schema/storage/whatever seems to just vanish after returning the newly
> cloned schema which results in exceptions like "Can't call method
> "source" on an undefined value" or "calling execute on disconnected handle".
That's not really a problem as such. If you let the object go out of scope it
goes out of scope :) if you don't do that you'll end up reconnecting all the
time which is pretty gross. The reason you get the exceptions is because a
live resultset doesn't keep the $schema in scope, since the alternative would
be a circular reference and hence a memory leak.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/