1#!perl -T
2use strict;
3use warnings;
4
5=head1 TEST PURPOSE
6
7These tests check that the inherited form of a routine is the exported one.
8
9=cut
10
11use Test::More tests => 3;
12
13BEGIN { use_ok('Sub::Exporter'); }
14
15package E::Parent;
16use Sub::Exporter -setup => { exports => [ qw(foo) ] };
17
18sub foo { return 1; }
19
20package E::Child;
21use base qw(E::Parent);
22
23sub foo { return 2; }
24
25package Test::Sub::Exporter::EPARENT;
26E::Parent->import('foo');
27
28main::is(foo(), 1, "get result of parent's import");
29
30package Test::Sub::Exporter::ECHILD;
31E::Child->import('foo');
32
33main::is(foo(), 2, "get result of child's import");
34