http://qs1969.pair.com?node_id=233544


in reply to Cyclic module references

Greetings,
Depending on how complicated your particular modules are, pieces of code you didn't represent here may need adjustment. Depending on what's there though, replacing use with require (followed by import where necessary) should provide a big step toward what you want. Consider for example, these modules which call functions from each other when they're loaded:

#test.pl #!/usr/bin/perl use warnings; use strict; use Foo; print "test.pl completed.\n"; #Foo.pm package Foo; require Bar; &Bar::print_bar; sub print_foo { print "Foo!\n"; } 1; #Bar.pm package Bar; require Foo; &Foo::print_foo; sub print_bar { print "Bar!\n"; } 1;

- BronzeWing