{"blog_url":"https://gfx.hatenadiary.org/","author_name":"gfx","image_url":null,"description":"\u3055\u3044\u304d\u3093\u6563\u898b\u3055\u308c\u308b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u306f\u60aa\u3044\u30b3\u30fc\u30c9\u3067\u3059\u3002 # usage: Foo->new({ age => 42 }) sub new { my($class, $args) = @_; return bless $args, $class; } \u305d\u308c\u306f\u3001\u30cf\u30c3\u30b7\u30e5\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3068\u60f3\u5b9a\u3055\u308c\u308b$args\u306e\u305d\u306e\u307e\u307e\u3064\u304b\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u5f15\u6570\u3068\u3057\u3066\u30cf\u30c3\u30b7\u30e5\u30ea\u30c6\u30e9\u30eb\u4ee5\u5916\u306e\u4f55\u304b\u3092\u6e21\u3059\u3068\u4e88\u671f\u3057\u306a\u3044\u52d5\u4f5c\u3092\u5f15\u304d\u8d77\u3053\u3059\u3068\u3044\u3046\u70b9\u3067\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u4f7f\u3044\u65b9\u306f\u554f\u984c\u3092\u5f15\u304d\u8d77\u3053\u3057\u307e\u3059\u3002 my %args = (age => 20); my $o1 = Foo->new(\\%args); my $o2 = Foo->ne\u2026","width":"100%","author_url":"https://blog.hatena.ne.jp/gfx/","title":" bless($args, $class) is a bad practice","height":"190","url":"https://gfx.hatenadiary.org/entry/20130818/1376790509","type":"rich","provider_url":"https://hatena.blog","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgfx.hatenadiary.org%2Fentry%2F20130818%2F1376790509\" title=\" bless($args, $class) is a bad practice - 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>","version":"1.0","published":"2013-08-18 10:48:29","blog_title":"Islands in the byte stream (legacy)","categories":[]}