タグ

Mooseに関するmatsutakegohan1のブックマーク (3)

  • Moose::Roleをちょろっと使ってみたよ - はこべにっき ♨

    Perl界隈では空前のMooseブームが起こっていて良いですね! そういえば,卒論で書いたコードでMooseを使っていたのを思い出したので,最近,使い方を把握したMoose::Roleを使ってリファクタリングしてみました. とか思って,書いてみましたが,実際書いてみるとMoose::Roleの使い方としてはすごく微妙になってしまいました!概念として継承関係になっているのを強引にmix-inにするとかわけわからないです!なので,以下若干ぐだぐだ. リファクタリング前のコード リファクタリングの対象とするのは,抽象的なAST Parserを実装したクラスです. 対象言語に依存しないような抽象的なParserクラスとしてNyanco::AST::Parseを定義しています, package Nyanco::AST::Parser; use Moose; use Nyanco::AST::Code

    Moose::Roleをちょろっと使ってみたよ - はこべにっき ♨
  • Moose::Cookbook - How to cook a Moose - metacpan.org

    NAME Moose::Cookbook - How to cook a Moose DESCRIPTION The Moose cookbook is a series of recipes showing various Moose features. Most recipes present some code demonstrating some feature, and then explain the details of the code. You should probably read the Moose::Manual first. The manual explains Moose concepts without being too code-heavy. RECIPES Basic Moose These recipes will give you a good

  • 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

  • 1