logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: [Module::Build] codebase? paths in .tar.gz?: msg#00028

Subject: Re: [Module::Build] codebase? paths in .tar.gz?
On approximately 12/19/2003 12:36 AM, came the following characters from
the keyboard of Dave Rolsky:

On Fri, 19 Dec 2003, Glenn Linderman wrote:


"perl build dist" produces errors, and "perl build ppd" produces errors:


You probably don't want to build a PPD unless you understand what the
various things that go in a PPD are.  I'm not an expert on it, but I did
write the PPD-related code for Module::Build, and from what I can gather
you need to actually understand how it will be used, where it will be
installed from, etc., to make it work.

I want to build a PPD, even though I don't fully understand all the things in the PPD. This is a module for ActivePerl I'm building, so it needs to be PPD.

I do have some experience with PPD files, as I fought with a bug in PPM long enough to learn a little about them. As it turns out, a relative path in the URL is the "best" in the sense that then the .tar.gz file is looked for in the same directory as the .ppd file, and that is certainly the easiest to package into a .zip (or any other kind of) wrapper for distributing the .ppd and .tar.gz files together. It also works well for installing them on a Web site, or moving them around on one's hard disk, without having to re-edit the .ppd file to reflect the path change. As far as the rest? I'm probably ignorant. The bug? I tried installing from the root directory of a drive during a period of time when that didn't work.

Unable to add file: 'GFfP-0.1/blib' at
C:\Perl\site\lib/Module/Build/Base.pm line 1706


This I'll let Ken answer.

Yes... Ken? And one more thing... it seems that case is not preserved in the file names... While that "doesn't matter" as long as the platform is Windows, it could be critical if the platform is not Windows. Windows is case-preserving, so if the user creates the files correctly, they will follow the proper conventions for a case sensitive file system as well. But M::B doesn't do that at present.

D:\GFfP>perl build ppd
Cannot create a PPD file unless codebase argument is given


Here's my build.pl

use Module::Build;
my $build = Module::Build->new
  (
   module_name => 'GFfP',
   license => 'restrictive',
   dist_author => 'Glenn Linderman <perl@xxxxxxxxxx>',
   requires => { 'perl' => '5.8.0', },
   codebase => '.',
  );
$build->create_build_script;


For some reason I can't recall, I coded it so that codebase can only be
given from the command line via:

 ./Build ppd codebase=.

However, I'm pretty sure a codebase on "." will not work, but I won't
swear to it.

Ah, at least I can experiment now.

A patch to make codebase settable via the new() method is probably good
thing, right Ken?

Perhaps overridable from the command line, for those that need it. Actually, assuming "no path at all" is probably a fine default. Certainly it is what I want.

The documentation Module::Build supplies for "codebase" is pretty terse,
and there are no examples of it in the sample Build.pl file.


That's cause I don't really understand the PPD stuff too well.  I was kind
of hoping some Win32 expert would fill in the the rest.

I'm not he, the expert is likely Jan Dubois, if you can get him interested in Module::Build.

And all those warnings from perl build dist are for directories... and
indeed, the resulting .tar.gz file has a flat structure... the files are
all there, but their directory structure is not preserved.  As a result,
I can't distribute the package.


I wonder if it's a permissions problem.

Dunno, I'm running as an administrator, and everything is in directories I own.

It'd be nice to have a sample MANIFEST file too, for a sample
project.


 ./Build manifest

I stumbled across that, but it wasn't immediately clear which files should be in MANIFEST, and which should not.

Remember, I'm on my first module here.

Seems to me like the Cookbook should have a trivial, but complete,
example of all the stuff you need to make your own pure perl module, and
another example with all the stuff you need to make your own XS module.


A module with (simple) XS is handled identically to a pure Perl module.
If you need to specify linker/compiler flags then it's a little different.


 I know that those sorts of examples would have saved me a lot of time
today.


Now that you know what they should be, why not submit a patch? ;)

Not everything is working 100% yet, so it is not clear I am an expert yet. And by the time I figure out how to submit a patch, Ken will have released this module.... maybe for the next release....

Thanks for your responses, though.


Oh, here's one other issue: perl build.pl seems to check the MANIFEST, but of course there is lots of stuff missing before you compile. It seems like maybe I either still don't understand MANIFEST files, or else the checking of MANIFEST should be done after the build, or else the MANIFEST should discriminate between "source" and "built" files, so proper (but different) checking can be done at either time.

--
Glenn -- http://nevcal.com/
===========================
Like almost everyone, I receive a lot of spam every day, much of it
offering to help me get out of debt or get rich quick.  It's ridiculous.
-- Bill Gates

And here is why it is ridiculous:
The division that includes Windows posted an operating profit of $2.26 billion on revenue of $2.81 billion. --from Reuters via http://biz.yahoo.com/rc/031113/tech_microsoft_msn_1.html

So that's profit of over 400% of investment... with a bit more investment in Windows technology, particularly in the area of reliability, the profit percentage might go down, but so might the bugs and security problems? Seems like it would be a reasonable tradeoff. WalMart earnings are 3.4% of investment.



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click


<Prev in Thread] Current Thread [Next in Thread>