Re: [Module::Build] [PATCH] ppm_dist action
Status: Beta
Brought to you by:
kwilliams
|
From: Glenn L. <pe...@ne...> - 2004-01-15 05:00:42
|
On approximately 1/14/2004 3:39 PM, came the following characters from the keyboard of Randy W. Sims: > 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 ??? Yes that is correct. At least on my machine, with A::T 1.08_01. I still think A::T needs some work, such that archives with paths less than 100 characters, and no paths greater than 100 characters, can be compatible with older tools. Either than, or only older versions of A::T should be used to build modules, so that the older tools 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. Well, I don't know anything about MANIFEST except what M::B taught me by reading its documentation and playing with it. And what you've told me here. > 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.) OK, so here I specifically added things from blib, because stuff wasn't showing up in the "build dist" archive... lacking "build ppm_dist", I was confused. I think now that you are saying that I should take them out. I'll try that.... yep, it still works. And the warnings are gone. > 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?) Yes, particularly if MANIFEST.SKIP doesn't exist, I think using that list would be an excellant option. Many simple modules wouldn't even need a MANIFEST.SKIP in that case. > 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. Well, I'm not educated enough in this area to suggest an alternative either, at least with any assurance that it makes sense. I made one suggestion about adding _CPAN and _PPD to the name of the file, and I think I myself would be annoyed if all the distributoins had that tag. But maybe... maybe this idea would have some merit... Maybe a build area should have 2 more directories, CPAN and PPM (and those should be added to the MANIFEST.SKIP and the default skip list mentioned above). The command build dist should put its .tar.gz file in the CPAN directory, and the commands build ppm_dist and build ppd should put their output in the PPM directory (creating the directories if they don't exist). One thing for sure... assuming that "authors should just know" is a great way to perpetuate the confusion. Now that it seems that Randy, you, and I have pooled our knowledge and my stumblings around with this simple module, it might be nice to add documentation and/or pointers to such documentation to the M::B help files. The following things were very confusing to me: MANIFEST - where should I look for documentation dist - seemed like it should work for PPD on Windows platform. Now that ppm_dist exists this might not be so confusing. ppd - I think all my confusion with this has gone away with the numerous fixes that have been made. > Regards, > Randy. -- Glenn -- http://nevcal.com/ =========================== The best part about procrastination is that you are never bored, because you have all kinds of things that you should be doing. |