[Catalyst] (no subject)

Daniel Hulme st at istic.org
Sat Mar 31 15:55:16 GMT 2007


On Sat, Mar 31, 2007 at 04:25:58PM +0200, Jack Lauritsen wrote:
> Sorry to have asked,
> I found what I needed at
> http://search.cpan.org/~jrobinson/DBIx-Class-0.07005/lib/DBIx/Class/ResultSet.pm#find_or_create
> 
> Here, I'll give myself a combined STFW&&RTFM...
Surely you'd be better off with STFW||RTFM. That way you will only
evaluate the latter if the former fails, rather than only if it succeeds
as in your suggestion.

Mind you, if you're considering migrating to Perl 6, you might consider
STFW//RTFM, which returns the value of the former if it is defined; the
value of the latter o/w.

-- 
"And I see losing love is like a  window in your heart:  everybody sees 
 you're  blown  apart;  everybody  sees  the  wind  blow  in Graceland."
 -- Paul Simon, 1986
http://surreal.istic.org/      The Answer of the Oracle Is Always Death.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070331/601085b2/attachment.pgp


More information about the Catalyst mailing list