Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / inc / Module / Install.pm
CommitLineData
3fea05b9 1package inc::Module::Install;
2
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.
5#
6# It runs from the installed location, and is never bundled
7# along with the other bundled modules.
8#
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.
12
13use strict;
14use vars qw{$VERSION};
15BEGIN {
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.
21 $VERSION = '0.91';
22}
23
24if ( -d './inc' ) {
25 my $author = $^O eq 'VMS' ? './inc/_author' : './inc/.author';
26 if ( -d $author ) {
27 $Module::Install::AUTHOR = 1;
28 require File::Path;
29 File::Path::rmtree('inc');
30 }
31} else {
32 $Module::Install::AUTHOR = 1;
33}
34
35unshift @INC, 'inc' unless $INC[0] eq 'inc';
36require Module::Install;
37
381;
39
40__END__
41
42=pod
43
44=head1 NAME
45
46inc::Module::Install - Module::Install configuration system
47
48=head1 SYNOPSIS
49
50 use inc::Module::Install;
51
52=head1 DESCRIPTION
53
54This module first checks whether the F<inc/.author> directory exists,
55and removes the whole F<inc/> directory if it does, so the module author
56always get a fresh F<inc> every time they run F<Makefile.PL>. Next, it
57unshifts C<inc> into C<@INC>, then loads B<Module::Install> from there.
58
59Below is an explanation of the reason for using a I<loader module>:
60
61The original implementation of B<CPAN::MakeMaker> introduces subtle
62problems for distributions ending with C<CPAN> (e.g. B<CPAN.pm>,
63B<WAIT::Format::CPAN>), because its placement in F<./CPAN/> duplicates
64the real libraries that will get installed; also, the directory name
65F<./CPAN/> may confuse users.
66
67On the other hand, putting included, for-build-time-only libraries in
68F<./inc/> is a normal practice, and there is little chance that a
69CPAN distribution will be called C<Something::inc>, so it's much safer
70to use.
71
72Also, it allows for other helper modules like B<Module::AutoInstall>
73to reside also in F<inc/>, and to make use of them.
74
75=head1 AUTHORS
76
77Audrey Tang E<lt>autrijus@autrijus.orgE<gt>
78
79=head1 COPYRIGHT
80
81Copyright 2003, 2004 Audrey Tang E<lt>autrijus@autrijus.orgE<gt>.
82
83This program is free software; you can redistribute it and/or modify it
84under the same terms as Perl itself.
85
86See L<http://www.perl.com/perl/misc/Artistic.html>
87
88=cut