Subject: | defined &$class is not how you detect if a class has been loaded |
BOP has code in it like this:
$subclass = "Foo::Bar";
if (!defined(&$subclass)) {
eval "use $subclass";
}
That check is not checking that the class Foo::Bar is loaded. It is
checking if there is a subroutine named Foo::Bar(). I don't see code in
BOP which is defining a sub for each subclass and testing shows this
code doesn't really work.
What I would suggest instead to ensure you don't initialize a subclass
multiple times (which is what this code appears to be attempting) is to
simply keep a hash of loaded subclasses inside BOP and check it.