Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Cyclic module references

by BronzeWing (Monk)
on Feb 07, 2003 at 17:58 UTC ( #233544=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://233544]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2023-02-06 04:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (33 votes). Check out past polls.

    Notices?