=head1 NAME

Perl::Dist::Bootstrap - Bootstrapping to build Win32 Perl from scratch

=head1 DESCRIPTION

Running Perl::Dist::Builder requires Perl and numerous modules.  Therefore,
one needs to have a working installation of Perl on Win32 with all the
appropriate modules.  A pre-built Win32 binary installer is one possibility
to bootstrap an environment to build other Win32 binary installations.

However, a binary Perl installation cannot be used to build another copy
of itself (or it would overwrite itself as it tried).  Since Perl
hard-codes @INC directories into the binary, avoiding this collision
requires more than renaming the installed Perl directory and changing PATH
and other enviroment variables.

Instead, a new Perl distribution must be built with a custom path that won't
collide with the path of any Perl that will be built.  Here is one way of
boostrapping to that point using L<Perl::Dist::Strawberry>, assuming no Perl
already exists on the computer in question:

=over

=item *

Download a Strawberry Perl executable installer and install it.  It will be
located at C<< C:\strawberry-perl >>.  

=item *

Install L<Perl::Dist::Builder> from CPAN to pick up all dependencies.

=item *

Download a copy of the Perl::Dist::Strawberry tarball to access the
configuration and extra files for the build process.  Unpack it and open a
command shell in that directory.

=item *

Edit C<< strawberry.yml >> and change the "image_dir" parameter to a
different path, e.g. C<< C:\bootstrap-perl >>.

=item *

Run C<< perl bin\full_build.pl >>, which will build and install a
Strawberry Perl installation at that location.

=item *

Edit the PATH, LIB, and INCLUDE environment variables to refer to 
C<< bootstrap-perl >> instead of C<< strawberry-perl >>.

=item *

Install L<Perl::Dist::Builder> from CPAN to pick up all dependencies
again, this time installed in the fresh C<< C:\bootstrap-perl >>.

=item *

Change the C<< strawberry.yml >> image_dir parameter back to 
C<< C:\strawberry-perl >> (for building Strawberry Perl).

=back

At this point, the perl located at C<< C:\bootstrap-perl >> will be the
default perl and will not be affected by rebuilding a new Strawberry Perl
at C<< C:\strawberry-perl >>.
