[DBIx-Class-Devel] [dbix-class] Doc patch for explaining custom ResultSet classes (#49)

Peter Rabbitson notifications at github.com
Tue Jul 1 09:52:17 GMT 2014


Ok. While on the surface this looked like a trivial thing it actually turned out to be much more involved. These pieces were committed to current/for_cpan_index so far:

* Some refactor of the docs 293a9242a and downright purge of useless deps 77a6448dc
* An easier-to-follow version of your datetime example a0a0da0ae

The remaining piece is pushed to wip/moo_resultsets_docs, and has the following outstanding problem that needs attention: The Moose example has only BUILDARGS yet the Moo example has both BUILDARGS and FOREIGNBUILDARGS. Please investigate, see which one is right and resubmit changes to 15c43cfda (the example code has to be flawless, as the cargocult of this will be high)

As an aside - there was an issue brought up yesterday on IRC concerning Moose-based Result classes (not ResultSet classes). Perhaps a separate patch to document that inconsistency would also be of use: 
```
<corgifex> ribasushi: 1) is using Moose with DBIx::Class supported at all? 2) is MooseX::NonMoose + extends 'DBIx::Class::Core' the right way?  3) is 'lazy' a sensible workaround for DBIx::Class not calling the constructor? 4) is there a better way to do this?
<ribasushi> corgifex: in this case it depends what you mean by "supported"
<ribasushi> corgifex:  the core DBIC result class has 2 separate constructors, which was a good idea at the time it was written, so if you expect constructor-based thingies to work, you will have to do some duct taping
<ribasushi> corgifex: and as you already properly noted default non-lazy attributes do not work without constructor-based instantiation
<ribasushi> corgifex: so it all depends on "how do you want things to interface" - it will be a tradeoff either way, and you need to decide where to make it
```

Cheers and thanks again for looking into this

---
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/dbix-class/pull/49#issuecomment-47637403
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20140701/ccb98d22/attachment.htm>


More information about the DBIx-Class-Devel mailing list