On 2016-10-18, 07:05, David Christensen wrote:

Once upon a time, I created a distribution with circular dependencies.
Then I discovered that a compiler failure in one module that is part of
a circular dependency loop will cause a domino effect whereby none of
the modules in the loop will compile (!).  The same goes for all the
test scripts that depend upon any of those modules (!).  I recall that
finding and fixing problems under such circumstances could be very
tough.  I also recall throwing away my entire working file set, doing a
fresh check-out, and starting over from scratch on more than one occasion.
...
How do other module authors solve the intra-distribution module
dependency problem?

Commit regularly, commit often, don't be afraid to revert or to git reset --hard :-)

I have some rather alarming intra-distribution module dependency problems in one of my dists - Number-Phone - but seem to muddle through OK. Debugging when I break part of it can be a bit of a pig though.

If I followed my own advice (which of course I don't - I don't practice what I preach because I'm ~~better than the people I'm preaching to~~ ~~not the sort of person I'm preaching to~~ lazy) then my tests would be proper unit tests which rigourously mock each little bit of code's interactions with others, thus making the whole problem go away. I even wrote a little ball of Scary to help with that:
  https://metacpan.org/pod/Class::Mock::Generic::InterfaceTester

--
David Cantrell | Pope | First Church of the Symmetrical Internet

There are two kinds of security, the one that keeps your sister
out, the one that keeps the government out and the one that
keeps Bruce Schneier out.

Reply via email to