[Dbix-class] register_source() regression in 0.08102
Ian Wells
ijw at cack.org.uk
Thu May 7 22:51:55 GMT 2009
2009/5/7 Ronald J Kimball <rkimball+dbixclass at pangeamedia.com>:
> 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.
The way the document reads to me:
> register_extra_source
> Arguments: $moniker, $result_source
> As "register_source" but should be used if the result class already has a source and you want to register an extra one.
...it's not that you're registering a second ResultSource called
UserSession (which you clearly aren't), it's that you're registering a
second source *of* UserSession Result classes. If that's the case the
error message could do with the word 'Result' in it (which it would
have if you used load_namespaces, but I guess you're using
load_classes; perhaps the message could be changed for clarity?). If
that's not the case the docs could do with a touch-up.
In passing, I note that ResultSource's documentation refer to the
'[rR]esult class' a couple of times, but don't actually define what
the term means for a ResultSource. Indeed, there's no implication
that a ResultSource class has a corresponding Result class or how you
might find out what it is, but there is an implication that the
'Result class' is used during deployment. Perhaps someone who knows
how the two relate could add it to the documentation in there
somewhere?
--
Ian.
More information about the DBIx-Class
mailing list