{"id":122665,"date":"2024-06-11T10:05:42","date_gmt":"2024-06-11T01:05:42","guid":{"rendered":"https:\/\/softantenna.com\/blog\/?p=122665"},"modified":"2024-06-11T10:05:42","modified_gmt":"2024-06-11T01:05:42","slug":"perl-5-40","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/perl-5-40\/","title":{"rendered":"Perl 5.40\u304c\u30ea\u30ea\u30fc\u30b9 - \u65b0\u3057\u3044\u300c__CLASS__\u300d\u30ad\u30fc\u30ef\u30fc\u30c9\u306e\u5c0e\u5165\u306a\u3069"},"content":{"rendered":"<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/06\/s_20240611_095055.jpg\" alt=\"S 20240611 095055\" title=\"s_20240611_095055.jpg\" border=\"0\" width=\"906\" height=\"510\" \/><\/p>\n<p>Perl\u958b\u767a\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f6\u67089\u65e5(\u73fe\u5730\u6642\u9593)\u3001Perl 5\u306e\u6700\u65b0\u7248\u300cPerl 5.40\u300d\u3092<a href=\"https:\/\/www.cpan.org\/src\/README.html\">\u30ea\u30ea\u30fc\u30b9<\/a>\u3057\u307e\u3057\u305f\u3002\u73fe\u5728\u6700\u65b0\u7248\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092cpan.org\u306a\u3069\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6700\u65b0\u7248\u3067\u306f\u65b0\u3057\u3044<code>__CLASS__<\/code>\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u5c0e\u5165\u3055\u308c\u307e\u3057\u305f\u3002<code>__PACKAGE__<\/code>\u3068\u306f\u7570\u306a\u308a\u3001<code>__CLASS__<\/code>\u30ad\u30fc\u30ef\u30fc\u30c9\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30fb\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u5c5e\u3057\u3066\u3044\u308b\u5b9f\u884c\u6642\u30af\u30e9\u30b9\u3092\u8a8d\u8b58\u3059\u308b\u305f\u3081\u3001\u30af\u30e9\u30b9\u306e\u30e1\u30bd\u30c3\u30c9\u30fb\u30c7\u30a3\u30b9\u30d1\u30c3\u30c1\u3001\u7279\u306b\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3067 $self \u3078\u306e\u30a2\u30af\u30bb\u30b9\u304c\u8a31\u53ef\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<pre>\nuse feature 'class';\n\nclass Example1 {\n    field $f = __CLASS__->default_f;\n\n    sub default_f { 10 }\n}\n<\/pre>\n<p>\u30d5\u30a3\u30fc\u30eb\u30c9\u5909\u6570\u3078\u306e<code>:reader<\/code>\u5c5e\u6027\u306e\u8ffd\u52a0\u3084\u3001<code>-M<\/code>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u30b9\u30da\u30fc\u30b9\u306e\u8a31\u53ef\u3001VERSION\u5ba3\u8a00\u306e\u4f7f\u7528\u5236\u9650\u3001\u65b0\u3057\u3044<code>builtin::inf<\/code> \u304a\u3088\u3073 <code>builtin::nan<\/code>\u95a2\u6570\u306e\u8a66\u9a13\u7684\u5c0e\u5165\u3001\u65b0\u3057\u3044<code>^^<\/code>xor\u6f14\u7b97\u5b50\u306e\u8ffd\u52a0\u306a\u3069\u3082\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre>\n$x ^^ $y and say \"One of x or y is true, but not both\";\n<\/pre>\n<p><code>try\/catch<\/code>\u6a5f\u80fd\u3084\u3001for\u3067\u8907\u6570\u306e\u5024\u3092\u53cd\u5fa9\u51e6\u7406\u3059\u308b\u6a5f\u80fd\u3001<code>builtin<\/code>\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5b89\u5b9a\u5316\u304c\u884c\u308f\u308c\u305f\u307b\u304b\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u554f\u984c\u306e\u4fee\u6b63\u3084\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u66f4\u65b0\u3001\u5909\u66f4\u3082\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u65b0\u6a5f\u80fd\u306e\u8a73\u7d30\u306f<a href=\"https:\/\/perldoc.perl.org\/perldelta\">\u3053\u3061\u3089<\/a>\u3067\u78ba\u8a8d\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<table>\n<tr>\n<th rowspan='4' style='white-space: nowrap;'><img decoding=\"async\" style=\"max-width: 52px; height: auto;\" src=\"https:\/\/softantenna.com\/assets\/pc-f2a988b09e78cdb7e82ccf4d5545bf2d95f8251f80444b8e2c54ac3839335945.png\" \/><\/th>\n<th style='white-space: nowrap;'>\u30bf\u30a4\u30c8\u30eb<\/th>\n<td>Perl<\/td>\n<\/tr>\n<tr>\n<th style='white-space: nowrap;'>\u516c\u5f0f\u30b5\u30a4\u30c8<\/th>\n<td><a href=\"http:\/\/www.cpan.org\/src\/README.html\">http:\/\/www.cpan.org\/src\/README.html<\/a><\/td>\n<\/tr>\n<tr>\n<th style='white-space: nowrap;'>\u30bd\u30d5\u30c8\u30a2\u30f3\u30c6\u30ca<\/th>\n<td><a href=\"https:\/\/softantenna.com\/softwares\/1962-perl\">https:\/\/softantenna.com\/softwares\/1962-perl<\/a><\/td>\n<\/tr>\n<tr>\n<th style='white-space: nowrap;'>\u8aac\u660e<\/th>\n<td>\u30e1\u30b8\u30e3\u30fc\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u8a00\u8a9e\u3002<\/td>\n<\/tr>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Perl\u958b\u767a\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f6\u67089\u65e5(\u73fe\u5730\u6642\u9593)\u3001Perl 5\u306e\u6700\u65b0\u7248\u300cPerl 5.40\u300d\u3092\u30ea\u30ea\u30fc\u30b9\u3057\u307e\u3057\u305f\u3002\u73fe\u5728\u6700\u65b0\u7248\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092cpan.org\u306a\u3069\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u6700\u65b0\u7248\u3067\u306f\u65b0\u3057\u3044__CLA [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":122666,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[75],"tags":[570],"class_list":["post-122665","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-perl"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/122665","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=122665"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/122665\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/122666"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=122665"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=122665"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=122665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}