タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

scope-guardに関するkamipoのブックマーク (2)

  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

  • Guard vs Scope::Guard - D-6 [相変わらず根無し]

    Guard vs Scope::Guard perl 5.8.8 で GuardとScope::Guardを比較してみた。関数が終了したタイミングでコールバックが走るようにした状態で比較。Guardはスコープ終了時に走るscope_guard()とダイナミックガードであるguard()両方で試してみた。 use strict; use Benchmark qw(cmpthese); use Scope::Guard; use Guard; cmpthese(500_000, { scope_guard => sub { my $guard = Scope::Guard->new(sub { 1 }); }, guard_dynamic => sub { my $guard = guard { 1 }; }, guard => sub { scope_guard { 1 }; } }); 結

  • 1