2 use Test::More qw(no_plan);
6 (our $Kw = Filter::Keyword->new(
8 target_package => __PACKAGE__,
9 keyword_name => 'method',
12 if (my ($stripped, $matches) = $obj->match_source('', '{')) {
13 my $name = $obj->current_match->[0];
14 $stripped =~ s/{/; sub ${name} { my \$self = shift;/;
15 return ($stripped, 1);
24 method main { 'YAY '.$self };
26 my $x = "method foo bar baz";
28 method spoon { 'I HAZ A SPOON'};
30 warn __PACKAGE__->main;
31 warn __PACKAGE__->spoon;