projects
/
p5sagit/Devel-Declare.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
initial import, still fragile as all hell
[p5sagit/Devel-Declare.git]
/
t
/
simple.t
1
use strict;
2
use warnings;
3
4
print "1..1\n";
5
6
sub method {
7
my ($pack, $name, $sub) = @_;
8
no strict 'refs';
9
*{"${pack}::${name}"} = $sub;
10
}
11
12
use Devel::Declare 'method';
13
14
method 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));