package Fruit; use vars qw{$VERSION @ISA @EXPORT @EXPORT_OK}; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(slice slice_some); use strict; sub slice; # so i don't have to call slice() - is this the right place to do this ? sub slice_some; sub slice_some { slice 'grapefruit'; slice 'straberries'; } sub slice { my $thing = $_[0]; defined $thing or $thing = 'default_thing'; # slice here.. } 1; #### package Fruit::Apple; use vars qw{$VERSION @ISA @EXPORT @EXPORT_OK}; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(cut); use strict; use Fruit; sub cut; sub cut { my $thing = $_[0]; defined $thing or $thing = 'default_thing'; # cut here.. and then also use slice... slice 'mango'; slice; } 1; #### #!/usr/bin/perl -Tw # this is makesalad.cgi use strict; use Fruit; use Fruit::Apple; slice_some; slice 'orange'; slice; cut; exit;