SYNOPSIS
Assuming there is a CPAN module Foo::Bar and mst wants to write an ALTernate called Alt::Foo::Bar::MSTROUT.In mst's Foo::Bar, there is the following line:
use constant ALT => 'MSTROUT';
In the alt module:
package Alt::Foo::Bar::MSTROUT; use Alt::Assert; # imports assert() 1;
Users use mst's Foo::Bar as normal, just like they would use the original Foo::Bar:
use Foo::Bar -various => [qw(weird import)], {API=>'things'};
or:
require Foo::Bar;
If they want to assert they have the mst version, they can:
use Foo::Bar -various => [qw(weird import)], {API=>'things'}; use Alt::Foo::Bar::MSTROUT;
or:
require Foo::Bar; require Alt::Foo::Bar::MSTROUT; Alt::Foo::Bar::MSTROUT->assert;