[CDBI] Re: Trouble with Perl's reverse function

Perrin Harkins perrin at elem.com
Tue Nov 14 23:15:15 GMT 2006

On Tue, 2006-11-14 at 18:04 -0500, Edward J. Sabol wrote:
> Looks like Ricardo already solved Carlos' problem, but I just thought that
> I'd chime in in favor of changing "(...)[0]" to "->first" anyway. I haven't
> benchmarked it personally, but I believe this to be an easy and very
> worthwhile optimization to make.

It's a readability optimization.  It probably is slightly slower,
because of an extra method call.

What I normally use is actually this:
my ($zone) = $class->search(mname => $domain);

- Perrin

More information about the ClassDBI mailing list