[Dbix-class] transaction in a resultset class

shawn wilson ag4ve.us at gmail.com
Fri Apr 12 14:50:23 GMT 2013


On Thu, Apr 11, 2013 at 9:15 PM, Charlie Garrison <garrison at zeta.org.au> wrote:
> Good morning,
>
>
> On 11/04/13 at 12:06 PM -0400, shawn wilson <ag4ve.us at gmail.com> wrote:
>
>> Err, not sure if that was stated that well - how would I write something
>> like:
>>
>> $schema->txn_do(sub{
>> $self->create({
>> url   => $page,
>> stamp => time,
>> });
>> });
>
>
> Did you read the docco Peter sent links for? It explains how to get $schema.
>
> If you did read it, then which part of it is confusing? (There has been
> recent discussion about improving docs and a patch to make it clearer would
> be appreciated I'm sure.)
>
> Also, telling us where your confusion is will help us to help you further.
>

I had to read it a few more times until I got it.

I think that maybe showing more resultset examples in the cookbook
might've helped or have working Cookbook::Recipe(s) like Moose? Even
taking the artist cd example out of cookbook and making a working
example (with or without explanation but in a runable forum) would be
cool.



More information about the DBIx-Class mailing list