gotta have a plan
[p5sagit/Devel-Declare.git] / t / padstuff.t
1 use strict;
2 use warnings;
3 use Test::More;
4
5 sub action (&) { return shift; }
6
7 sub handle_action {
8   return (undef, undef, 'my ($self, $c) = (shift, shift);');
9 }
10
11 use Devel::Declare;
12 use Devel::Declare action => [ DECLARE_NONE, \&handle_action ];
13
14 my $args;
15
16 my $a = action {
17   $args = join(', ', $self, $c);
18 };
19
20 $a->("SELF", "CONTEXT");
21
22 is($args, "SELF, CONTEXT", "args passed ok");
23
24 done_testing;