タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

mooseとoopに関するloosecontrolのブックマーク (2)

  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

  • I, newbie » Mooseによるオブジェクト指向Perl

    Mooseは”an extension of the Perl 5 object system”だそうで、なんかすごいらしい。使ってみるとattributeやaccessorの追加も簡単で、型の確認も自動でやってくれてrobustなclassを作るのに便利。attributeがarrayやhashのreferenceだったら、contextに応じて自動的にdereferenceしてくれるとか、extendやoverrideがやりやすいとか、他にもいろいろあるらしい。Mooseは自動的にhash-basedのobjectを作ってくれる。methodを追加する方法も古典的なPerl5のOOPと同じ。 package Foo; use strict; use warnings; use Moose; sub say { my ($self, $str) = @_; print "$str\n";

  • 1