Yuval Kogman æ°ã Try::Tiny ã¨ããæ°ããä¾å¤ææã¢ã¸ã¥ã¼ã«ããªãªã¼ã¹ãããããªã®ã§ããã³ããã¼ã¯ãåã£ã¦ã¿ã¾ããã ãã³ããã¼ã¯ã³ã¼ãã¯ãError.pm ã®ãªã¼ãã¼ãããã§æ¸ãããã®ãæµç¨ãã¾ããã ãã³ããã¼ã¯ã³ã¼ã #!/usr/bin/perl use strict; use warnings; use Benchmark qw(:all); use Try::Tiny; use Error; cmpthese(timethese(100000, { 'eval' => sub { _eval(\&die_with_object); _eval(\&die_with_string); _eval(\&dont_die); }, 'try' => sub { _tiny(\&die_with_object); _tiny(\&die_with_string);
{{#tags}}- {{label}}
{{/tags}}