Re: [Module::Build] [PATCH] ppm_dist action
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <Ra...@Th...> - 2004-01-14 23:39:35
|
On 1/14/2004 11:09 AM, Glenn Linderman wrote: > The decompress and build and install all worked lots better this time. > > Now to try building my GFfP module... > > Yes, that seems to work too. Hurray! So, ppm install <your-module> does work ??? > As expected, though, the paths are not visible. > > > Now what about the organization of my module? > > I misspoke when I mentioned needing to put my .pm file in blib manually, > it is required to be in lib, which is much less likely to get deleted. > > But why do I get errors during "perl build.pl" telling me that the files > built by the build step are not present at the "perl build.pl" step? As > far as I can determine, they shouldn't be. A similar warning for > META.yml and README showed up when I did "perl build.pl" for the > Module-Build.zip above. Such warnings do not engender confidence in the > module, or in the M::B process. Module::Build works the same in this regard as MakeMaker; in fact, they both use the same module, ExtUtils::Manifest. You probably know that every module on CPAN contains a MANIFEST file. This file contains a list of every file included in the CPAN distribution, and it is used as a sanity check to detect corrupted distributions (and absent-minded authors). One of the first things that happen when you type 'perl Build.PL' or 'perl Makefile.PL' is that the contents of the MANIFEST is compared to the contents of the directory where the distribution is unpacked. If there is a mismatch, you will see the warnings you noted above. As a module author you must keep the MANIFEST up to date. For Module::Build users, you need to create a 'MANIFEST.SKIP' file with at least the following contents: ^_build ^Build$ ^blib ^MANIFEST\.SKIP$ (Others are suggested in the Module::Build and the ExtUtils::Manifest pods.) The contents of the 'MANIFEST.SKIP' file are a series of regular expressions, one per line, that if matched to a file /path/ while scanning the distribution directory, will be omitted from the 'MANIFEST' file. (Maybe the above list should automatically be added to the skip list?) Once you have that setup all you need to do is run 'perl Build manifest' anytime you add or remove a file from your distribution. Although it might initially seem complex, in practice, it is a very simple procedure that helps make sure distributions are 'sane'. The reason you got the errors in the zip file I posted is that I didn't prepare it as a distribution--It was just for testing. > But at least it works now, it is much more fun to talk about the > "little" problems when the basic functionality works! > > I'm assuming that for distribution for PPM users, that I will never need > to use "perl build dist"... so the "differing content" in the .tar.gz > file build by "dist" vs "ppm_dist" won't annoy me... but will it annoy > others, that want to do both types of distributions? To be honest, I don't have an opinion about this issue. It would seem like authors should just know and should test each dist before release, so it shouldn't be an issue. I don't see any obvious alternative that I like. Regards, Randy. |