From: matthewt Date: Sun, 21 Oct 2007 22:17:35 +0000 (+0000) Subject: test I never noticed to add X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=445cdd0cbdf41f59b094e178beb0bd86b84dfb35;p=p5sagit%2FDevel-Declare.git test I never noticed to add git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-Declare@3828 bd8105ee-0ff8-0310-8827-fb3f25b6796d --- diff --git a/t/build_sub_installer.t b/t/build_sub_installer.t new file mode 100644 index 0000000..8a73730 --- /dev/null +++ b/t/build_sub_installer.t @@ -0,0 +1,20 @@ +use strict; +use warnings; +use Test::More 'no_plan'; + +use Devel::Declare (); + +BEGIN { + Devel::Declare->build_sub_installer('Foo', 'bar', '&') + ->(sub { $_[0]->("woot"); }); +} + +my $args; + +{ + package Foo; + + bar { $args = join(', ', @_); }; +} + +is($args, 'woot', 'sub installer worked');