[Moscow.pm] Запутался

Mons Anderson mons на cpan.org
Ср Окт 3 04:37:06 PDT 2012


>
>
> я бы вообще может быть сделал через
> if (do_sometthing) { guard { rollback_something } }
>
>
хотя это не в моем стиле
лучше так:

$resources[$x] = acquire_resource() and guard {
free_resource $resources[$x] };
$resources[$y] = acquire_resource() and guard {
free_resource $resources[$y] };
$resources[$z] = acquire_resource() and guard {
free_resource $resources[$z] };

-- 
Best wishes,
Vladimir V. Perepelitsa aka Mons Anderson
<inthrax на gmail.com>, <mons на cpan.org>
http://github.com/Mons
----------- следущая часть -----------
Вложение в формате HTML было извлечено…
URL: <http://mail.pm.org/pipermail/moscow-pm/attachments/20121003/d2242cb1/attachment-0001.html>


Подробная информация о списке рассылки Moscow-pm