Re: [Module::Build] Archive::Tar file format
Status: Beta
Brought to you by:
kwilliams
|
From: Randy K. <ra...@th...> - 2004-01-13 03:41:56
|
On Mon, 12 Jan 2004, Glenn Linderman wrote: [ ... ] > Seems like the archive made with M::B dist target does > contain blib contents. Now maybe that is because I stuck > lots of bad things in my MANIFEST (which I just whacked at > until it worked, except something still doesn't)... > > MANIFEST This list of files > META.yml no clue, but Module::Build wants it > build.pl Module::Build facility > blib/lib/GFfP.pm The main module (but no brains) > blib/arch/auto/GFfP/GFfP.bs no clue > blib/arch/auto/GFfP/GFfP.dll The brains for the module > blib/arch/auto/GFfP/GFfP.exp related to the .dll somehow > blib/arch/auto/GFfP/GFfP.lib related to the .dll somehow > > With this MANIFEST, I get errors when I first run M::B (or > after a realclean), saying that the stuff that isn't built > yet, isn't there, so therefore the package isn't complete. > That bothers me somewhat, and maybe the reason is because > of what you are saying about the difference between the > archives. But including these files in MANIFEST seemed to > be the only way to get them in the archive! And the M::B > people have seen my MANIFEST in my test case before. > > I also wasn't particularly thrilled with moving my > "source" GFfP.pm into blib/lib, as I think it would be too > easy to want to delete blib directory... I'd have expected > a structure where the .pm file was in the root directory, > and then got copied into blib/lib during the build > process. That's probably a good idea to not put stuff in blib/ from the outset. As well as the blib/ directory potentially getting deleted, the build process might overwrite some files in blib/, or some unwanted files there may get installed (eg, a Win32 dll gets put into a non-Win32 system). Finally, I think the PAUSE indexer ignores files under blib/, so tools like CPAN/CPANPLUS, which uses the PAUSE indices, might not see your modules. > Pardon all my ignorances, but this is my first "written > from scratch" module, and although I've read a bunch of > docs, most of this doesn't seem to be particularly well > documented unless it is already understood. > Or else I've missed where MANIFEST contents are > documented. I have to confess to not reading any > MakeMaker documentation, since I chose to try out M::B > instead. But a MakeMaker module I've worked on some > clearly keeps its source .pm files in the root of the file > structure... and has no blib references in its MANIFEST. > So that's why I was surprised, probably. If your goal for the package is to provide both the sources (for systems with a compiler) and a Win32 ppm package, what you could do is make up an ordinary package (without a blib/ directory), so users with a compiler will build it normally. Then, add into the distribution the M::B generated ppd file, plus an archive that you make up consisting of just the contents of the blib/ directory that results after you build it (assuming on Win32). As you mentioned earlier, you may want to rename this archive to something that won't conflict with that made by the dist target - you can call it anything you want, as long as the codebase of the ppd file is adjusted accordingly. Then, all a Win32 user would have to do is to ppm install Your-Package.ppd to install it - they wouldn't have to build anything. If you wanted to adjust things so a Win32 user would go through perl Build.PL perl Build perl Build test perl Build install to do all this, you could subclass Module::Build for Win32 to, eg, run 'ppm install Your-Package.ppd' for the install target, and unpack the archive (into a blib/ directory) which will be used in running the tests. -- best regards, randy |