<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gfx</author_name>
  <author_url>https://blog.hatena.ne.jp/gfx/</author_url>
  <blog_title>Islands in the byte stream (legacy)</blog_title>
  <blog_url>https://gfx.hatenadiary.org/</blog_url>
  <categories>
    <anon>Perl</anon>
  </categories>
  <description>Perlにinstanceof演算子があればいいのにと思うことがたまにある。 $xがオブジェクトで，$classのインスタンスであれば真を返す演算子だ。 既存のコードではなかなか一発でできない。 $x-&gt;isa($class); # (1) ref($x) &amp;&amp; eval{ $x-&gt;isa($class} }; # (2) Scalar::Util::blessed($x) &amp;&amp; $x-&gt;isa($class); # (3) Params::Util::_INSTANCE($x, $class); # (4) (1)は要件を満たさない (2)は要件を満たし、ほとんどの場合は高速だが，$xがbl…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgfx.hatenadiary.org%2Fentry%2F20080926%2F1222403476&quot; title=&quot;instanceof演算子 - Islands in the byte stream (legacy)&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>2008-09-26 13:31:16</published>
  <title>instanceof演算子</title>
  <type>rich</type>
  <url>https://gfx.hatenadiary.org/entry/20080926/1222403476</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
