1# test the export_hooks method
2package My::Exporter7;
3use base 'Badger::Exporter';
4
5__PACKAGE__->export_hooks( foo => \&foo_hook, bar => \&bar_hook );
6
7our $BUFFER = '';
8our $DEBUG  = 0 unless defined $DEBUG;
9
10sub foo_hook {
11    my ($class, $target, $symbol, $rest) = @_;
12    my $value = shift(@$rest);
13    print STDERR "running foo_hook [$symbol:$value]\n" if $DEBUG;
14    $BUFFER .= "[$symbol:$value]";
15}
16
17sub bar_hook {
18    my ($class, $target, $symbol, $rest) = @_;
19    print STDERR "running bar_hook [$symbol]\n" if $DEBUG;
20    $BUFFER .= "[$symbol]";
21}
22
23
241;
25