Commit | Line | Data |
---|---|---|
94caac6e | 1 | use strict; |
2 | use warnings; | |
974f5442 | 3 | use Test::More 'no_plan'; |
94caac6e | 4 | |
5 | sub method { | |
6 | my ($pack, $name, $sub) = @_; | |
7 | no strict 'refs'; | |
8 | *{"${pack}::${name}"} = $sub; | |
9 | } | |
10 | ||
11 | use Devel::Declare 'method'; | |
12 | ||
13 | method bar { | |
14 | my $str = join(', ', @_); | |
974f5442 | 15 | is($str, 'main, baz, quux', 'Method args ok'); |
94caac6e | 16 | }; |
17 | ||
18 | __PACKAGE__->bar(qw(baz quux)); |