最近使ってるPerlモジュール

Tech Kayac

Mar 22nd, 2013

DBIx::Schema::DSL

DDL生成して、GitDDLと連携して使ってる

Time::Piece::Plus

my $now = localtime;
my $day = $now->add(days => 10);

結構メンテが大変

Path::Tiny

use Path::Tiny;
my $file = path(...); # file, dir共通
my $content = $file->slurp_utf8;

Exception::Tiny

package MyApp::Exception;
use parent 'Exception::Tiny';

package main;
use Try::Tiny;

try {
    MyApp::Exception->throw;
}
catch {
    my $err = $_;
    ...
};

Class::Accessor::Lite::Lazy

use MyClass;
use Class::Accessor::Lite::Lazy (
    ro_lazy => [qw/hoge/],
);

sub _build_hoge {
    1;
}