<?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>
  </categories>
  <description>さいきん散見される以下のようなコードは悪いコードです。 # usage: Foo-&gt;new({ age =&gt; 42 }) sub new { my($class, $args) = @_; return bless $args, $class; } それは、ハッシュリファレンスと想定される$argsのそのままつかっているため、引数としてハッシュリテラル以外の何かを渡すと予期しない動作を引き起こすという点です。たとえば、以下のような使い方は問題を引き起こします。 my %args = (age =&gt; 20); my $o1 = Foo-&gt;new(\%args); my $o2 = Foo-&gt;ne…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgfx.hatenadiary.org%2Fentry%2F20130818%2F1376790509&quot; title=&quot; bless($args, $class) is a bad practice - 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>2013-08-18 10:48:29</published>
  <title> bless($args, $class) is a bad practice</title>
  <type>rich</type>
  <url>https://gfx.hatenadiary.org/entry/20130818/1376790509</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
