2007å¹´04æ23æ¥22:45 ã«ãã´ãªLightweight Languages perl - ä¸è½ãªnewã®æ¸ãæ¹ Perl 5ã®OOã¯ãæ £ãã¦ãã¾ãã¨ç°¡åã ã ç¶æ¿ã¨ãèããã«ãæ®éã«ã¯ã©ã¹ãä½ããããã°ãå¿ è¦ãªã®ã¯ä»¥ä¸ã®äºè¡ã ãã package Klass; sub new { bless {} }; ããã ãã§ã¯ä½ãã§ããªãã®ã§ãã¨ããããnameã¨ããã¢ã¯ã»ãµã¼ã追å ãã¦ã¿ããããã ãã sub name { my $self = shift; $self->{name} = shift if @_; return $self->{name}; } ããããä¸ã®å½¢å¼ã ã¨ãç¶æ¿ããµãã¼ããã¦ããªããã ããã package Klass; sub new { bless {} }; package Klass::Sub; our @ISA = qw/Klass/; # new
{{#tags}}- {{label}}
{{/tags}}