initial import, still fragile as all hell
[p5sagit/Devel-Declare.git] / t / simple.t
CommitLineData
94caac6e 1use strict;
2use warnings;
3
4print "1..1\n";
5
6sub method {
7 my ($pack, $name, $sub) = @_;
8 no strict 'refs';
9 *{"${pack}::${name}"} = $sub;
10}
11
12use Devel::Declare 'method';
13
14method bar {
15 my $str = join(', ', @_);
16 if ($str eq 'main, baz, quux') {
17 print "ok 1\n";
18 } else {
19 print "not ok 1\n";
20 }
21};
22
23__PACKAGE__->bar(qw(baz quux));