{"title":"An implementation of Devel::GlobalDestruction in pure Perl","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgfx.hatenadiary.org%2Fentry%2F20091116%2F1258363787\" title=\"An implementation of Devel::GlobalDestruction in pure Perl - Islands in the byte stream (legacy)\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"Devel::GlobalDestruction \u306fPurePerl\u3067\u3082\u5b9f\u88c5\u3067\u304d\u308b\u3002 END{ $in_global_destruction = 1; } sub DESTROY{ return if $in_global_destruction; # do something complex } Perl\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3082\u8aad\u3093\u3060\u304c\uff0c\u3053\u308c\u3067\u5b8c\u5168\u306bDevel::GlobalDestruction::in_global_destruction() \u306e\u4ee3\u66ff\u306b\u306a\u308b\u3002\u3061\u306a\u307f\u306b\uff0cPerl\u7d42\u4e86\u6642\u306b\u30c7\u30b9\u30c8\u30e9\u30af\u30bf\u8d77\u52d5\u3057\u305f\u304f\u306a\u3051\u308c\u3070\uff0c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3068DESTROY\u306e\u547c\u3073\u51fa\u3057\u305d\u306e\u3082\u306e\u3092\u30b9\u30ad\u30c3\u30d7\u3067\u304d\u308b*1\u3002 END{\u2026","blog_title":"Islands in the byte stream (legacy)","published":"2009-11-16 18:29:47","version":"1.0","image_url":null,"provider_name":"Hatena Blog","blog_url":"https://gfx.hatenadiary.org/","author_name":"gfx","type":"rich","categories":["Perl"],"height":"190","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/gfx/","url":"https://gfx.hatenadiary.org/entry/20091116/1258363787","width":"100%"}