Re: [PATCH] perl/Git.pm: add parse_rev method
- From
Randal L. Schwartz <merlyn@stonehenge.com>
- Date
- May 30, 2008, 21:44 UTC
- Message-ID
- <86r6bjmpqc.fsf@blue.stonehenge.com>
- In-Reply-To
- <7vd4n3iivt.fsf@gitster.siamese.dyndns.org>
>>>>> "Junio" == Junio C Hamano <gitster@pobox.com> writes:
Junio> Perhaps, but except for the use of nonstandard try...catch. I have been Junio> wondering if we can move away from it, with the goal of eventually getting Junio> rid of the construct altogether.
Junio> Didn't we hear from Randal that the construct is known to be leaky?
It'd be trivial to avoid this try/catch.
eval {
...
};
if ($@) {
if (UNIVERSAL::isa($@, "That::Class::Which::Should::Be::Ignored")) {
# ignore it
} else {
die $@; # re-throw it
}
}No leak there.
-- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion