[Dbix-class] Auto-generate random primary keys

Bernhard Graf dbic at augensalat.de
Fri Mar 10 16:41:46 CET 2006


On Wednesday 01 March 2006 16:59, Bernhard Graf wrote:
> Matt S Trout wrote:
> > On Wed, Mar 01, 2006 at 03:14:29PM +0100, Bernhard Graf wrote:
> > > Matt S Trout wrote:
> > > > It's broken.
> > > >
> > > > } while ($self->search({$column => $val}));
> > > >
> > > > should be
> > > >
> > > > } while ($self->result_source->resultset->search({$column =>
> > > > $val}));
> > >
> > > Very sophisticated. ;-)
> > >
> > > Unfortunately this results in an infinite loop.
> >
> > Not enough coffee, sorry.
> >
> > > $self->result_source->resultset->search({$column => $val})->next
> > > works.
> >
> > Or ->count, which is probably more efficient.
>
> Too late ;-). I just filed a bug report and patch to rt.cpan.org.
> http://rt.cpan.org/Public/Bug/Display.html?id=17917

Still no sign of life from the author. I wrote to him on March 1st and 
then two days ago. :-(

What's your opinion about something similar in the core DBIx::Class 
distribution? A DBIx::Class::UUIDMaker::RandomString for example?
-- 
Bernhard Graf



More information about the Dbix-class mailing list