Is it possible that Mojo::Server::Morbo uses the correct version of B and that overrides my "use lib" and the bogus b.pm it puts in @INC?
Looking at what happens on my own case-insensitive system (Windows 11), it would be quite possible that Mojo::Server::Morbo loads b.pm without issue - but it would need to also load the appropriate "object" version (1.68) to avoid that "version mismatch" error.
Does "use lib" specify a fully-qualified path, or does it specify a relative path (ie relative to ".") ?
If it's a relative path, then Mojo::Server::Morbo might not be able to find b.pm (because it has a different idea about the location of ".").
Therefore, it would have to look elsewhere, and eventually load the correct B.pm.
My guess is that Mojo::Server::Morbo is loading (the correct) "B.pm", but I can't rule out the possibility that it's happily loading "b.pm".
If you're able to temporarily edit or rename or remove this "b.pm", then you might get a better idea of what's happening.
Better still, I think, if the opportunity to remove "b.pm" permanently exists.
> My guess is that Mojo::Server::Morbo is loading (the correct) "B.pm"
Good guess! I wrote some test code and used Devel::Modlist to prove to myself that Mojo::Server::Morbo uses B via Future and it ignores the old b.pm in "use lib". No such thing happens at the command line so it loads the old b.pm and fails.