<?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>Devel::GlobalDestruction はPurePerlでも実装できる。 END{ $in_global_destruction = 1; } sub DESTROY{ return if $in_global_destruction; # do something complex } Perlのソースコードも読んだが，これで完全にDevel::GlobalDestruction::in_global_destruction() の代替になる。ちなみに，Perl終了時にデストラクタ起動したくなければ，以下のようにするとDESTROYの呼び出しそのものをスキップできる*1。 END{…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgfx.hatenadiary.org%2Fentry%2F20091116%2F1258363787&quot; title=&quot;An implementation of Devel::GlobalDestruction in pure Perl - 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>2009-11-16 18:29:47</published>
  <title>An implementation of Devel::GlobalDestruction in pure Perl</title>
  <type>rich</type>
  <url>https://gfx.hatenadiary.org/entry/20091116/1258363787</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
