andpackage Aa; use Bb; my $object = Bb->new();
Obviously, bad arhitecture, but a lot of other things depend on these, so I wasn't sure how can I solve these things. I know this is not entirely related to Perl, it has more to do with programming theory, but I thought Perl has some specific things regarding this, like how could I use some design pattern, if there is one for these situations. There are some other kinds of cyclical dependencies too, likepackage Bb; use Aa; my $object = Aa->new();
andpackage Aa; use Bb; my $result = Bb::some_function_which_does_not_create_object();
These can be broken sometimes by taking out one modules functionality and putting it into another module (class) and then each of the 2 modules can use this new one, breaking the cycle, but this solution is not working all the times either. Could any one help me towards this? Thanks in advance, faceless.package Bb; use Aa; my $object = Aa::some_function_which_does_not_create_object();
In reply to Trying to break cyclical dependencies in Perl modules by faceless
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |