mogilefs/MogileFS-Server — pull request #18 by frett (2012-06-08 21:16:16+00:00)
Title: this prevents some missing symbols because of a dependency cycle

this is a minor module dependency fix.

there is a dependency cycle in the form of:

MogileFS::Server -> MogileFS::ReplicationPolicy::MultipleHosts -> MogileFS::ReplicationRequest -> MogileFS::Server

this doesn't cause problems when MogileFS::Server is loaded first, but when MogileFS::ReplicationRequest is loaded first, MogileFS::ReplicationPolicy::MultipleHosts breaks with the following error:

Bareword "ALL_GOOD" not allowed while "strict subs" in use at /usr/local/share/perl5/MogileFS/ReplicationPolicy/MultipleHosts.pm line 47.
Bareword "TOO_GOOD" not allowed while "strict subs" in use at /usr/local/share/perl5/MogileFS/ReplicationPolicy/MultipleHosts.pm line 65.
Bareword "TOO_GOOD" not allowed while "strict subs" in use at /usr/local/share/perl5/MogileFS/ReplicationPolicy/MultipleHosts.pm line 66.
Bareword "ALL_GOOD" not allowed while "strict subs" in use at /usr/local/share/perl5/MogileFS/ReplicationPolicy/MultipleHosts.pm line 67.
Bareword "ALL_GOOD" not allowed while "strict subs" in use at /usr/local/share/perl5/MogileFS/ReplicationPolicy/MultipleHosts.pm line 68.
Bareword "ALL_GOOD" not allowed while "strict subs" in use at /usr/local/share/perl5/MogileFS/ReplicationPolicy/MultipleHosts.pm line 76.
Bareword "TEMP_NO_ANSWER" not allowed while "strict subs" in use at /usr/local/share/perl5/MogileFS/ReplicationPolicy/MultipleHosts.pm line 93.
Bareword "TEMP_NO_ANSWER" not allowed while "strict subs" in use at /usr/local/share/perl5/MogileFS/ReplicationPolicy/MultipleHosts.pm line 98.
Compilation failed in require at /usr/local/share/perl5/MogileFS/Server.pm line 63.
BEGIN failed--compilation aborted at /usr/local/share/perl5/MogileFS/Server.pm line 63.
Compilation failed in require at /usr/local/share/perl5/MogileFS/ReplicationRequest.pm line 3.
BEGIN failed--compilation aborted at /usr/local/share/perl5/MogileFS/ReplicationRequest.pm line 3.

an easy command to see this breakage is:
perl -mMogileFS::ReplicationRequest -e'1;'

I ran into this bug when upgrading the MogileFS database, my first plugin utilized MogileFS::FID, which requires MogileFS::ReplicationRequest before MogileFS::Server has been loaded.