Perl 6 - the future is here, just unevenly distributed

IRC log for #askriba, 2017-11-17

| Channels | #askriba index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
05:04 dboehmer_ joined #askriba
11:10 ashimema is it a bad idea to overload the update method?
11:10 ashimema I'm sure someone told me it's a terrible idea once.. but can't remember the reasoning ;)
11:35 karjala_ joined #askriba
11:36 ribasushi ashimema: you likely misremember ( though this is a "hot" topic with a lot of imprecise opinions about it )
11:36 ribasushi ashimema: in general there is nothing wrong with wrapping update() *except* many do it incorrectly because of its shitty design
11:36 ashimema haha, fair enough
11:37 ribasushi any time you do a wrapper ( ether around() or next::method style ) you must replicate the top part of the original update yourself
11:37 ribasushi namely this:
11:37 ashimema I think what I'm going to do is just create a new method to do my 'update_with_cascade' instead of overrideing update itself.
11:37 ashimema :)
11:37 ribasushi https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.082840/lib/DBIx/Class/Row.pm#L544-547
11:38 ashimema oh, interesting.. that'll definitely be something to store away in my mind.. thanks :)
11:38 ribasushi ^^ if you miss calling set_inflated_columns yourself, nobody will, the object may be deemed "up-to-date" and everything breaks further down
11:38 ashimema sorry I never got back to you way back btw.. I think we were both uber busy and I lost track..
11:38 ashimema can't even remember what my questions were from way back
11:38 ribasushi yeah ;)
11:38 ribasushi we should still look at it, but next week will be better ( busy times :/ )
11:38 ashimema and the pastes have all timed out now
11:39 ashimema sure thing.. if I can remember I'll certainly look you up ;)
11:39 ribasushi ashimema: regarding update_with_cascade: what do you want to do exactly?
11:39 ashimema my main dbic project has been recently sold so I'm going back to koha soon.. their dbic use is 'interesting' to say the least
11:40 ashimema I have a fangled inheritance system in place.
11:40 ashimema so the cascade basically updates all the child rows matching a certain condition so maintain inheritance
11:40 ribasushi newfangled or oldfanlged? :P
11:41 ribasushi is there a reason you haven't done RDBMS-style constraints for this, so that you don't need to think about cascades at all?
11:41 ashimema haha.. well this is new but on top of old.. and as we're passing over the codebase I thought consistency trumped newer better way ;)
11:42 ashimema as for not doing it using constraints it was more I wasn't entirely sure how to ;)
11:42 ashimema my hearts not in it any more :(.. I loved working in this code but since I've been sold out it's a bit more painful ;)
11:43 ribasushi ok I guess you have a plan in mind already, so carry on
11:44 ribasushi it just seems.. the wrong way around
18:39 karjala_ joined #askriba
22:31 karjala_ joined #askriba

| Channels | #askriba index | Today | | Search | Google Search | Plain-Text | summary