Alt
view release on metacpan or search on metacpan
A module "Foo::Bar" is distributed on CPAN as "Foo-Bar". It may have
submodules like "Foo::Bar::Baz".
To make an alternate CPAN version, leave everything exactly the same,
except distribute the new version as "Alt-Foo-Bar-AltIdentifier".
When a user installs your module like so:
PERL_ALT_INSTALL=OVERWRITE cpanm Alt::Foo::Bar::better
they will get your version of the Foo::Bar framework (Foo::Bar,
Foo::Bar::Baz).
Obviously, this completely overlays the old Foo::Bar install, but that's
the whole idea. The user isn't surprised by this because they just asked
for an Alternate implementation. If they don't like it, they can simply
reinstall the original Foo-Bar, or try some other alternate.
ALT BEST PRACTICES
This idea is new, and the details should be sorted out through proper
discussions. Pull requests welcome.
Due to experience with <http://cpantesters.org/> problems, it is
important to make your Alt module not install without explicit
direction. You can accomplish this easily in a Makefile.PL, with
something like this:
my $alt = $ENV{PERL_ALT_INSTALL} || '';
$WriteMakefileArgs{DESTDIR} =
$alt ? $alt eq 'OVERWRITE' ? '' : $alt : 'no-install-alt';
Similar techniques should be available for other module release
frameworks.
Module for CPAN Indexing
You will need to provide a module like "Alt::IO::All::MSTROUT" so
that CPAN will index something that can cause your distribution to
get installed by people:
PERL_ALT_INSTALL=OVERWRITE cpanm Alt::IO::All::MSTROUT
Since you are adding this module, you should add some doc to it
explaining your alternate version's improvements.
lib/Alt.pod view on Meta::CPAN
A module C<Foo::Bar> is distributed on CPAN as C<Foo-Bar>. It may have
submodules like C<Foo::Bar::Baz>.
To make an alternate CPAN version, leave everything exactly the same, except
distribute the new version as C<Alt-Foo-Bar-AltIdentifier>.
When a user installs your module like so:
PERL_ALT_INSTALL=OVERWRITE cpanm Alt::Foo::Bar::better
they will get your version of the Foo::Bar framework (Foo::Bar,
Foo::Bar::Baz).
Obviously, this completely overlays the old Foo::Bar install, but that's the
whole idea. The user isn't surprised by this because they just asked for an
B<Alt>ernate implementation. If they don't like it, they can simply reinstall
the original Foo-Bar, or try some other alternate.
=head1 ALT BEST PRACTICES
This idea is new, and the details should be sorted out through proper
lib/Alt.pod view on Meta::CPAN
=item Makefile.PL Changes
Due to experience with L<http://cpantesters.org/> problems, it is important to
make your Alt module B<not> install without explicit direction. You can
accomplish this easily in a Makefile.PL, with something like this:
my $alt = $ENV{PERL_ALT_INSTALL} || '';
$WriteMakefileArgs{DESTDIR} =
$alt ? $alt eq 'OVERWRITE' ? '' : $alt : 'no-install-alt';
Similar techniques should be available for other module release frameworks.
=item Module for CPAN Indexing
You will need to provide a module like C<Alt::IO::All::MSTROUT> so that
CPAN will index something that can cause your distribution to get installed
by people:
PERL_ALT_INSTALL=OVERWRITE cpanm Alt::IO::All::MSTROUT
Since you are adding this module, you should add some doc to it explaining
( run in 0.551 second using v1.01-cache-2.11-cpan-df04353d9ac )