1 package inc::Module::Install;
3 # This module ONLY loads if the user has manually installed their own
4 # installation of Module::Install, and are some form of MI author.
6 # It runs from the installed location, and is never bundled
7 # along with the other bundled modules.
9 # So because the version of this differs from the version that will
10 # be bundled almost every time, it doesn't have it's own version and
11 # isn't part of the synchronisation-checking.
14 use vars qw{$VERSION};
16 # While this version will be overwritten when Module::Install
17 # loads, it remains so Module::Install itself can detect which
18 # version an author currently has installed.
19 # This allows it to implement any back-compatibility features
20 # it may want or need to.
25 my $author = $^O eq 'VMS' ? './inc/_author' : './inc/.author';
27 $Module::Install::AUTHOR = 1;
29 File::Path::rmtree('inc');
32 $Module::Install::AUTHOR = 1;
35 unshift @INC, 'inc' unless $INC[0] eq 'inc';
36 require Module::Install;
46 inc::Module::Install - Module::Install configuration system
50 use inc::Module::Install;
54 This module first checks whether the F<inc/.author> directory exists,
55 and removes the whole F<inc/> directory if it does, so the module author
56 always get a fresh F<inc> every time they run F<Makefile.PL>. Next, it
57 unshifts C<inc> into C<@INC>, then loads B<Module::Install> from there.
59 Below is an explanation of the reason for using a I<loader module>:
61 The original implementation of B<CPAN::MakeMaker> introduces subtle
62 problems for distributions ending with C<CPAN> (e.g. B<CPAN.pm>,
63 B<WAIT::Format::CPAN>), because its placement in F<./CPAN/> duplicates
64 the real libraries that will get installed; also, the directory name
65 F<./CPAN/> may confuse users.
67 On the other hand, putting included, for-build-time-only libraries in
68 F<./inc/> is a normal practice, and there is little chance that a
69 CPAN distribution will be called C<Something::inc>, so it's much safer
72 Also, it allows for other helper modules like B<Module::AutoInstall>
73 to reside also in F<inc/>, and to make use of them.
77 Audrey Tang E<lt>autrijus@autrijus.orgE<gt>
81 Copyright 2003, 2004 Audrey Tang E<lt>autrijus@autrijus.orgE<gt>.
83 This program is free software; you can redistribute it and/or modify it
84 under the same terms as Perl itself.
86 See L<http://www.perl.com/perl/misc/Artistic.html>