<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shiba_yu36</author_name>
  <author_url>https://blog.hatena.ne.jp/shiba_yu36/</author_url>
  <blog_title>$shibayu36-&gt;blog;</blog_title>
  <blog_url>https://blog.shibayu36.org/</blog_url>
  <categories>
    <anon>perl</anon>
    <anon>tech</anon>
  </categories>
  <description>ある処理をするときに一定以上の時間かかったらtimeoutして処理を終わりたいみたいなことをしたい時がたまにあるので、それを行うSub::Timeoutというモジュールを作りました。https://github.com/shibayu36/p5-Sub-Timeout 使い方 use Sub::Timeout; use HTTP::Tiny; my $res = timeout 3.5, sub { HTTP::Tiny-&gt;new-&gt;get('http://example.com/foo'); }; 基本的には上のように、タイムアウトしたい秒数と処理のcoderefを渡します。 上の例だと3.…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.shibayu36.org%2Fentry%2F2013%2F06%2F07%2F134022&quot; title=&quot;処理のtimeoutを簡単に書くためのSub::Timeoutというモジュールを作りました - $shibayu36-&amp;gt;blog;&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-06-07 13:40:22</published>
  <title>処理のtimeoutを簡単に書くためのSub::Timeoutというモジュールを作りました</title>
  <type>rich</type>
  <url>https://blog.shibayu36.org/entry/2013/06/07/134022</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
