package inc::Module::Install; # This module ONLY loads if the user has manually install their own # installation of Module::Install, and are some form of MI author. # # It runs from the installed location, and is never bundled # along with the other bundled modules. # # So because the version of this differs from the version that will # be bundled almost every time, it doesn't have it's own version and # isn't part of the synchronisation-checking. use strict; use vars qw{$VERSION}; BEGIN { # While this version will be overwritten when Module::Install # loads, it remains so Module::Install itself can detect which # version an author currently has installed. # This allows it to implement any back-compatibility features # it may want or need to. $VERSION = '0.67'; } my $author = $^O eq 'VMS' ? './inc/_author' : './inc/.author'; if ( -d $author ) { $Module::Install::AUTHOR = 1; require File::Path; File::Path::rmtree('inc'); } unshift @INC, 'inc'; require Module::Install; 1; __END__ =pod =head1 NAME inc::Module::Install - Module::Install loader =head1 SYNOPSIS use inc::Module::Install; =head1 DESCRIPTION This module first checks whether the F directory exists, and removes the whole F directory if it does, so the module author always get a fresh F every time they run F. Next, it unshifts C into C<@INC>, then loads B from there. Below is an explanation of the reason for using a I: The original implementation of B introduces subtle problems for distributions ending with C (e.g. B, B), because its placement in F<./CPAN/> duplicates the real libraries that will get installed; also, the directory name F<./CPAN/> may confuse users. On the other hand, putting included, for-build-time-only libraries in F<./inc/> is a normal practice, and there is little chance that a CPAN distribution will be called C, so it's much safer to use. Also, it allows for other helper modules like B to reside also in F, and to make use of them. =head1 AUTHORS Audrey Tang Eautrijus@autrijus.orgE =head1 COPYRIGHT Copyright 2003, 2004 by Audrey Tang Eautrijus@autrijus.orgE. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L =cut