Skip Menu |

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 76525
Status: resolved
Priority: 0/
Queue: DBIx-Class

Owner: Nobody in particular
Requestors: n [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.08204

Subject: DBIx::Class::InflateColumn documentation: second arg in inflate/deflate subs exists but not covered by pod
Date: Fri, 13 Apr 2012 11:03:59 +0400
To: bug-DBIx-Class [...]
From: Nikolay Shaplov <n [...]>
Download (untitled) / with headers
text/plain 927b
I was writing a schema that should use different inflate/deflate functions for "content" attribute, depending on the value of "type" attr. First I read a documentation and thought it is impossible. Then I've dumped all function arguments and found out that inflate/deflate subs are receiving a Result Record as as a second argument. But this behavior is not covered by documentation. Using the Result Record arg you can do something like this: __PACKAGE__->inflate_column('content' => { deflate => sub {my $content = shift; my $rr = shift; return lc($content) if $rr->type eq 'NS'; ....... return $content; }, }); If this behavior is not going to be changed in further versions (I hope it will not) it is better to be property documented
Download (untitled) / with headers
text/plain 279b
It already is documented: I would be happy to accept a patch to make the documentation clearer however. Let me know if you plan to submit one, or if we should close this ticket. Cheers!
Documentation and synopsis improved in

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to