Re: [PATCH] perl/Git.pm: add parse_rev method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Junio" == Junio C Hamano <gitster@xxxxxxxxx> 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@xxxxxxxxxxxxxx> <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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux