blob: 8ab2f4449147c129c48df1c50d9abfa003e31363 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
BEGIN {
package My::Parser;
use Exporter 'import';
our @EXPORT = 'foo';
use Parse::Keyword { foo => \&parse_foo };
sub foo { $_[0] }
sub parse_foo {
my ($keyword) = @_;
return sub { uc($keyword) };
}
$INC{'My/Parser.pm'} = __FILE__;
}
use My::Parser;
is(foo, 'FOO');
done_testing;
|