#-------------------------------------------------------------------- Undefined subroutine &AB_prod::send_mail called at /usr/web/wonko/test/lib/AB/AB_prod.pm line 18. #-------------------------------------------------------------------- #### /usr/web/wonko/test/test1.pl #-------------------------------------------------------------------- #!/usr/local/bin/perl -w use strict; use lib qq{/usr/web/wonko/test/lib/SYS}; use lib qq{/usr/web/wonko/test/lib/AB}; use SYS_mail qw( send_mail ); # Move after AB_prod & error goes away use AB_prod qw( send_notice ); # uses SYS_mail.pm as well. send_notice(); exit; #-------------------------------------------------------------------- #### /usr/web/wonko/test/AB/AB_prod.pm #-------------------------------------------------------------------- package AB_prod; use lib qq{/usr/web/wonko/test/lib/SYS}; use SYS_mail qw ( send_mail ); use strict; use vars qw(@ISA @EXPORT_OK); use Exporter(); @ISA = qw(Exporter); @EXPORT_OK = qw( send_notice ); sub send_notice { print qq{Hello from AB_prod::send_notice\n}; send_mail(); } 1; #-------------------------------------------------------------------- #### /usr/web/wonko/test/lib/SYS/SYS_mail.pm #-------------------------------------------------------------------- package SYS_mail; use lib qq{/usr/web/wonko/test/lib/AB}; use AB_prod qw( send_notice ); use strict; use vars qw(@ISA @EXPORT_OK); use Exporter(); @ISA = qw(Exporter); @EXPORT_OK = qw( send_mail ); sub send_mail { print qq{Hello from SYS_mail::send_mail\n}; } 1; #-------------------------------------------------------------------- #### #-------------------------------------------------------------------- :!./test1.pl Hello from AB_prod::send_notice Undefined subroutine &AB_prod::send_mail called at /usr/web/wonko/test/lib/AB/AB_prod.pm line 18. #--------------------------------------------------------------------