(Yes, I'm on Win32. I don't like it much, either, but it isn't my
computer to choose the operating system for!)
I finally found the fix for this, by the way. I'm asking for
additional testing, especially on other platforms than Win32, before I ask
Ken to put it in (although maybe he'll want to anyway on his own!)
I'm not saying it's a Module::Build bug in particular, but maybe put this
in the cookbook?
I'm attaching the Build.PL with the routine (with only one line
changed) that finally worked for me.
Here was the error I got before (I added --verbose to the command line):
-----
...>Build ppmdist --verbose --tar tar.exe --gzip gzip.exe
Creating D:\Curtis\Desktop\TalkLibrary Stuff\Work Area\PPM-Talk_Library-v0.28.13
9.tar.gz
tar.exe cvf D:\Curtis\Desktop\TalkLibrary Stuff\Work Area\PPM-Talk_Library-v0.28
.139.tar blib
tar.exe: Cannot open D:\Curtis\Desktop\TalkLibrary Stuff\Work Area\PPM-Talk_Libr
ary-v0.28.139.tar: Function not implemented
tar.exe: Error is not recoverable: exiting now
-----
This is the version of tar that I'm using right now. It's the build off of
gnuwin32.sourceforge.net.
-----
D:\Curtis\Desktop\TalkLibrary Stuff\Work Area>tar --version
tar (GNU tar) 1.13
Copyright (C) 1988, 92,93,94,95,96,97,98, 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by John Gilmore and Jay Fenlason.
-----
Apparently this version of tar has a problem with filenames longer than 63
characters or something (I tried changing the directory names to ones
without spaces, it didn't matter), even though it'll print the filename
correctly. It's not the fact that it has backslashes, either, otherwise
the current fix would not work. (It still has one backslash in it)
Maybe the "or something" is the colon in the drive part of the name?
The reason I don't use Archive::Tar is that Archive::Tar 1.29 generates
.tar files without directories, according to WinZip. and I don't want to
distribute packages that are iffy like that! This version of tar will read
those files just fine (so I know it's WinZip's fault, but I'm still
touchy, OK?), and it'll create ones that work, so I use it and the gzip
version from the same place and just put them in my path and specify the
--tar and --gzip options.
--Curtis
--
Curtis Jewell
[EMAIL PROTECTED]
[EMAIL PROTECTED] http://curtis.livejournal.com/
%DCL-E-MEM-BAD, bad memory
-VMS-F-PDGERS, pudding between the ears
[I use PC-Pine, which deliberately does not display colors and pictures
in HTML mail]
#!perl
use strict;
use warnings;
use Module::Build 0.2804;
# $Revision: 142 $ $Date: 2006-08-03 07:25:10 +0900 (Thu, 03 Aug 2006) $
# $ $URL: file:///D:/Curtis/Repository/TalkLibrary/trunk/Build.PL $
my $class = Module::Build->subclass(code => <<'EOF');
sub ACTION_ppmdist {
my ($self) = @_;
$self->depends_on( 'build' );
my $ppm = $self->ppm_name;
$self->delete_filetree( $ppm );
$self->log_info( "Creating $ppm\n" );
$self->add_to_cleanup( $ppm, "$ppm.tar.gz" );
my %types = ( # translate types/dirs to those expected by ppm
lib => 'lib',
arch => 'arch',
bin => 'bin',
script => 'script',
bindoc => 'man1',
libdoc => 'man3',
binhtml => undef,
libhtml => undef,
);
foreach my $type ($self->install_types) {
next if exists( $types{$type} ) && !defined( $types{$type} );
my $dir = File::Spec->catdir( $self->blib, $type );
next unless -e $dir;
my $files = $self->rscan_dir( $dir );
foreach my $file ( @$files ) {
next unless -f $file;
my $rel_file =
File::Spec->abs2rel( File::Spec->rel2abs( $file ),
File::Spec->rel2abs( $dir ) );
my $to_file =
File::Spec->catdir( $ppm, 'blib',
exists( $types{$type} ) ? $types{$type} : $type,
$rel_file );
$self->copy_if_modified( from => $file, to => $to_file );
}
}
foreach my $type ( qw(bin lib) ) {
local $self->{properties}{html_css} = 'Active.css';
$self->htmlify_pods( $type, File::Spec->catdir($ppm, 'blib', 'html') );
}
# create a tarball;
# the directory tar'ed must be blib so we need to do a chdir first
my $start_wd = $self->cwd;
chdir( $ppm ) or die "Can't chdir to $ppm";
# POSSIBLE FIX for too long a tar file name.
# $self->make_tarball( 'blib', File::Spec->catfile( $start_wd, $ppm ) );
$self->make_tarball( 'blib', File::Spec->catfile( File::Spec->updir(), $ppm )
);
chdir( $start_wd ) or die "Can't chdir to $start_wd";
$self->depends_on( 'ppd' );
$self->delete_filetree( $ppm );
}
EOF
my $build = $class->new
(
module_name => 'Talk_Library',
dist_version_from => 'cgi-bin/nph-talk-library',
dist_abstract => 'CGI script and modules to implement a library of
talks.',
license => 'perl',
dist_author => 'Curtis Jewell <[EMAIL PROTECTED]>',
dynamic_config => 0,
create_makefile_pl => 'passthrough',
xml_files => {
'lib/Talk_Library/db/image.xml' => 'lib/Talk_Library/db/image.xml',
'lib/Talk_Library/db/css.xml' => 'lib/Talk_Library/db/css.xml'
},
script_files => {'cgi-bin/nph-talk-library' => 1},
requires => {
# These aren't required by TalkLibrary directly, but by modules required by it.
'XML::XPath' => 0, # Net::Yadis
'XML::Parser' => '2.23', # XML::XPath
'Digest::HMAC_SHA1' => 0, # Net::OpenID::JanRain::Consumer
'Math::BigInt' => 0, # Net::OpenID::JanRain::Consumer
'Math::BigInt::GMP' => 0, # Net::OpenID::JanRain::Consumer
'Crypt::DH' => 0, # Net::OpenID::JanRain::Consumer
'Net::Yadis' => 0, # Net::OpenID::JanRain::Consumer
'URI' => 0, # Net::Yadis
# Now we get to what we ACTUALLY require.
'Net::OpenID::JanRain::Consumer' => 0,
'perl' => '5.6.0',
'CGI' => 0, # CGI::Cookie is included in this package.
'CGI::Session' => 0,
'File::Slurp' => 0,
'HTTP::Date' => 0, # This is in libwww-perl
'MIME::Base64' => '2.00', # libwww-perl requires this version.
'Tie::IxHash' => 0,
'version' => '0.64',
'XML::Simple' => 0,
'XML::Writer' => 0,
},
build_requires => {
'Test::More' => 0,
'Module::Build' => '0.2804'
},
recommends => {
'CGI' => '2.64', # To handle XHTML properly.
'Digest::MD5' => 0, # To be able to send Content-MD5
headers.
'Crypt::SSLeay' => 0, # If you want to be able to use
https to check OpenID's.
'XML::SAX' => 0, # XML::Simple
'XML::NamespaceSupport' => '1.04', # XML::Simple
'XML::SAX::Expat' => 0, # Speeds up XML::SAX
'XML::Parser' => '2.27', # XML::SAX::Expat's required version.
'LWPx::ParanoidAgent' => 0 # More safety for OpenID's
},
);
$build->add_build_element('xml');
$build->create_build_script;