ã¢ã¯ã»ãµ(2) AUTOLOAD ã§ã¢ã¯ã»ãµ - ã±ããæ¥è¨ ã¢ã¯ã»ãµã®ä½ææ¹æ³ã¯ãããããããã©èªä½ãããªãAUTOLOADã¨ã使ããã«ã package Hoge::Class; use strict; for my $method (qw/age name tel hoge/) { my $code = sub { my $self = shift; $self->{$method} = shift if @_; return $self->{$method}; }; no strict 'refs'; *{$method} = $code; } ã£ã¦æãã§ã¯ãã¼ã¸ã£ã¨åã°ããã§å®ç¾©ããã°ãããã¨ã AUTOLOAD使ããªã使ãã§ãååå¼ã³åºãæã«ã¡ã½ããå®ç¾©ãã¦ãã¾ãã®ãã»ãªãªã¼ãªãã§ã äºåº¦ç®ä»¥éã¯AUTOLOADãå¼ã³åºãããªããªãããé ãã¨ããåé¡ã¯è§£æ±ºãããã¨ã sub A
{{#tags}}- {{label}}
{{/tags}}