[Module::Build] codebase? paths in .tar.gz?
Status: Beta
Brought to you by:
kwilliams
|
From: Glenn L. <pe...@ne...> - 2003-12-19 08:30:12
|
So, having seen some discussion on "the best way to build Perl modules",
and needing to write my very first Perl module (that needs to be
packaged for distribution, and yes, it contains XS code) I decided to
try out Module::Build.
It would be helpful if there were sample build.pl files in the
documentation or with the distribution. Maybe there are, but not in
what was installed by PPM.
Of course there is the "trivial" build.pl file in the documentation, so
I started there, and things went well. Got my module compiled and
linked, and even installed.
"perl build dist" produces errors, and "perl build ppd" produces errors:
D:\GFfP>perl build dist
Deleting META.yml
mkdir GFfP-0.1
mkdir GFfP-0.1/blib
mkdir GFfP-0.1/blib/arch
mkdir GFfP-0.1/blib/arch/auto
mkdir GFfP-0.1/blib/arch/auto/GFfP
mkdir GFfP-0.1/blib/lib
Creating GFfP-0.1.tar.gz
Unable to add file: 'GFfP-0.1' at C:\Perl\site\lib/Module/Build/Base.pm
line 1706
Unable to add file: 'GFfP-0.1/blib' at
C:\Perl\site\lib/Module/Build/Base.pm line 1706
Unable to add file: 'GFfP-0.1/blib/lib' at
C:\Perl\site\lib/Module/Build/Base.pm line 1706
Unable to add file: 'GFfP-0.1/blib/arch' at
C:\Perl\site\lib/Module/Build/Base.pm line 1706
Unable to add file: 'GFfP-0.1/blib/arch/auto' at
C:\Perl\site\lib/Module/Build/Base.pm line 1706
Unable to add file: 'GFfP-0.1/blib/arch/auto/GFfP' at
C:\Perl\site\lib/Module/Build/Base.pm line 1706
Deleting GFfP-0.1
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 <pe...@ne...>',
requires => { 'perl' => '5.8.0', },
codebase => '.',
);
$build->create_build_script;
So you can see from the build.pl that I *did* supply a codebase
parameter, at least as far as I could figure out how. I figured to
compare the resulting .ppd file with one from a different module and
tweak the supplied value appropriately, but I get the error that it
isn't supplied, so maybe I am supplying it in the wrong place?
The documentation Module::Build supplies for "codebase" is pretty terse,
and there are no examples of it in the sample Build.pl file.
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.
It'd be nice to have a sample MANIFEST file too, for a sample
project.
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.
I know that those sorts of examples would have saved me a lot of time
today.
--
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.
|