[Dbix-class] RootClass DBIx::ContextualFetch

Will Crawford billcrawford1970 at gmail.com
Mon Sep 28 09:45:14 GMT 2015


I'd create some sort of proxy object that stores a ref to $schema and does
the ->dbh_do magic behind the scenes whenever you call a method on it ...

On 26 September 2015 at 18:23, Bill Moseley <moseley at hank.org> wrote:

>
>
> On Sat, Sep 26, 2015 at 8:54 AM, Peter Rabbitson <rabbit+dbic at rabbit.us>
> wrote:
>
>
>> Is there any problem with setting the RootClass as DBIx::ContextualFetch
>>> and running DBIC normally?
>>>
>>
>> I don't think there will be, but this has not been tested either.
>
>
> Thanks, Peter.
>
>
>> I would wrap the entire app call as:
>>
>>  $storage->dbh_do(sub { app goes here using $_[1] } )
>>
>
> I looked at that, but I guess I'm not clear how to use accomplish it since
> there's hundreds (if not thousands) of existing individual direct DBI calls
> in the app.
>
>
> Thanks,
>
> --
> Bill Moseley
> moseley at hank.org
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive:
> http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20150928/d275e047/attachment.htm>


More information about the DBIx-Class mailing list