[Dbix-class] register_source() regression in 0.08102

Ronald J Kimball rkimball+dbixclass at pangeamedia.com
Thu May 7 21:45:49 GMT 2009


I'm currently using the following code in one of my schema modules, 
based on the message 
http://www.mail-archive.com/dbix-class@lists.scsys.co.uk/msg02613.html

   my $new_month = '200905';
   my $user_session_source = __PACKAGE__->source('UserSession');
   my $new_source = $user_session_source->new($user_session_source);
   $new_source->name("user_session_$new_month");
   __PACKAGE__->register_source("UserSession$new_month" => $new_source);

This works fine in 0.08010, but in 0.08102, I get the following warning:

DBIx::Class::Schema::register_source(): 
AdEngine::Schema::AdEngineDB::UserSession already has a source, use 
register_extra_source for additional sources at 
/usr/local/lib/site_perl/AdEngine/Schema/AdEngineDB.pm line 27

What is the correct way to implement this with 0.08102?  I'm skeptical 
about register_extra_source(), because I'm not registering an additional 
source for UserSession; I'm registering a new source for UserSession200905.

thanks,
Ronald



More information about the DBIx-Class mailing list