# register object in objects.pm sub RegisterObject { my ($Pack,$Object,$Tag) = @_; my ($Name); $Name = uc($Tag) . 'OBJ'; $Pack->{'Objects'}->{$Name}->[0] = $Object; $Pack->{'Objects'}->{$Name}->[1] = $Tag; print STDERR "Registered Object $Tag with Objects Handler\n"; } # autoload in object.pm sub AUTOLOAD { my ($Pack) = shift; my ($Type,$Calledas,$Key,$Name); if (ref($Pack)) { $Type = ref($Pack); } else { print STDERR "$Pack is not an Object\n"; exit(1); } $Calledas = $AUTOLOAD; $Calledas =~ s/.*://; foreach $Key (keys(%{$Pack->{'Objects'}})) { if ($Pack->{'Objects'}->{$Key}->[1] eq $Calledas) { return($Pack->{'Objects'}->{$Key}->[0]); } } print STDERR "%%%%%%% Unregistered Object - AUTOLOAD Called as $Calledas %%%%%%%%\n"; return(-1); } # from your main script register the objects of liba and libb. # the $main::Objects must be the object of Objects.pm. $main::Objects->RegisterObject($BlessedObjectRef, $ObjectName); # you have to pass $main::Objects to liba and libb during object creation(probable in new()) # from there on your liba can use libb routines like $main::Objects->liba->routineX() # which will call autoload and retrieve the object of liba and call the routineX. # the same can be used in libb.