package Module;
use strict;
use Exporter;
use vars qw{$VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS};
$VERSION = '0.01';
@ISA = qw(Exporter);
@EXPORT = qw();
@EXPORT_OK = qw(food cook);
%EXPORT_TAGS = ( kitchen => [qw(food)], all => [qw(food cook)]);
sub cook;
sub food;
cook {
print "cooked $_[0]";
}
food {
my $food = $_[0];
defined $food or $food = 'apples';
print "$food is food";
}
1;
####
use Module qw(:all);
food('grapes');
food;
# this works fine.
####
use Module qw(:all);
####
Undefined subroutine &Module::Module2::div called at /xxxxx/Module/Module2.pm line xxx