[Dbix-class] Re: Return value of DBIx::Class::ResultSet::find()
Bernhard Graf
dbic3 at augensalat.de
Mon May 14 09:39:26 GMT 2007
A. Pagaltzis wrote:
> * Bernhard Graf <dbic3 at augensalat.de> [2007-05-13 22:30]:
> > do_something($alpha, $rs->find($id), $omega);
> >
> > meaning do_something() is called with three arguments if find()
> > succeeds and two arguments if it fails.
>
> do_something($alpha, scalar $rs->find($id), $omega);
I know and once I found the source of my problem I fixed it exactly this
way.
But my email was not about a workaround for a probably common pitfall.
Or do you call scalar() on each subroutine in a subroutine argument list
by default?
--
Bernhard Graf
More information about the Dbix-class
mailing list