Test::More 㧠teardown/setup http://blog.ainam.me/2013/04/09/test-more-perl-testing/ http://lestrrat.ldblog.jp/archives/26535307.html package t::Util; use parent qw(Exporter); our @EXPORT = qw(lovetest $MOCK); use Test::More; sub lovetest { # setup local $MOCK = ...; # teardown 㯠guard object ã§ã goto \&Test::More::subtest; } ããã¦ãã¹ãã±ã¼ã¹ã¯ããã lovetest 'foo' => sub { ... $MOCK->do_something; }; ã¨ããã®ãããæ°
{{#tags}}- {{label}}
{{/tags}}