use 5.010;
# Trick perl into thinking that Moose.pm has
# already been required.
$INC{'Moose.pm'} = '/tmp/Moose.pm';
# Require it for real. But perl does nothing!
require Moose;
# Perl thinks Moose is loaded.
say "Moose is loaded" if $INC{'Moose.pm'};
# But it isn't really, so we don't know VERSION.
say 'Moose version:', Moose->VERSION;
####
{
package My::Plugin;
...
}
Something::That::Uses::Plugins->load_plugin('My::Plugin');
####
{
package My::Plugin;
...
$INC{'My/Plugin.pm'} = __FILE__;
}
Something::That::Uses::Plugins->load_plugin('My::Plugin');