{"url":"https://blog.shibayu36.org/entry/2013/06/07/134022","type":"rich","author_url":"https://blog.hatena.ne.jp/shiba_yu36/","title":"\u51e6\u7406\u306etimeout\u3092\u7c21\u5358\u306b\u66f8\u304f\u305f\u3081\u306eSub::Timeout\u3068\u3044\u3046\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f5c\u308a\u307e\u3057\u305f","categories":["perl","tech"],"image_url":null,"provider_name":"Hatena Blog","blog_title":"$shibayu36->blog;","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.shibayu36.org%2Fentry%2F2013%2F06%2F07%2F134022\" title=\"\u51e6\u7406\u306etimeout\u3092\u7c21\u5358\u306b\u66f8\u304f\u305f\u3081\u306eSub::Timeout\u3068\u3044\u3046\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f5c\u308a\u307e\u3057\u305f - $shibayu36-&gt;blog;\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u3042\u308b\u51e6\u7406\u3092\u3059\u308b\u3068\u304d\u306b\u4e00\u5b9a\u4ee5\u4e0a\u306e\u6642\u9593\u304b\u304b\u3063\u305f\u3089timeout\u3057\u3066\u51e6\u7406\u3092\u7d42\u308f\u308a\u305f\u3044\u307f\u305f\u3044\u306a\u3053\u3068\u3092\u3057\u305f\u3044\u6642\u304c\u305f\u307e\u306b\u3042\u308b\u306e\u3067\u3001\u305d\u308c\u3092\u884c\u3046Sub::Timeout\u3068\u3044\u3046\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f5c\u308a\u307e\u3057\u305f\u3002https://github.com/shibayu36/p5-Sub-Timeout \u4f7f\u3044\u65b9 use Sub::Timeout; use HTTP::Tiny; my $res = timeout 3.5, sub { HTTP::Tiny->new->get('http://example.com/foo'); }; \u57fa\u672c\u7684\u306b\u306f\u4e0a\u306e\u3088\u3046\u306b\u3001\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3057\u305f\u3044\u79d2\u6570\u3068\u51e6\u7406\u306ecoderef\u3092\u6e21\u3057\u307e\u3059\u3002 \u4e0a\u306e\u4f8b\u3060\u30683.\u2026","published":"2013-06-07 13:40:22","width":"100%","author_name":"shiba_yu36","blog_url":"https://blog.shibayu36.org/","height":"190","provider_url":"https://hatena.blog","version":"1.0"}