module-build-general Mailing List for Module::Build (Page 26)
Status: Beta
Brought to you by:
kwilliams
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(24) |
Sep
(2) |
Oct
(18) |
Nov
(36) |
Dec
(17) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(3) |
Feb
(96) |
Mar
(82) |
Apr
(63) |
May
(90) |
Jun
(52) |
Jul
(94) |
Aug
(89) |
Sep
(75) |
Oct
(118) |
Nov
(101) |
Dec
(111) |
| 2004 |
Jan
(159) |
Feb
(155) |
Mar
(65) |
Apr
(121) |
May
(62) |
Jun
(68) |
Jul
(54) |
Aug
(45) |
Sep
(78) |
Oct
(80) |
Nov
(271) |
Dec
(205) |
| 2005 |
Jan
(128) |
Feb
(96) |
Mar
(83) |
Apr
(113) |
May
(46) |
Jun
(120) |
Jul
(146) |
Aug
(47) |
Sep
(93) |
Oct
(118) |
Nov
(116) |
Dec
(60) |
| 2006 |
Jan
(130) |
Feb
(330) |
Mar
(228) |
Apr
(203) |
May
(97) |
Jun
(15) |
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Dr B. <la...@ms...> - 2006-02-21 13:40:22
|
On Tue, 21 Feb 2006, Randy W. Sims wrote:
> I don't see anything that stands out as related to changes I made. From
> the distro directory, can you run
> perl Build.PL
> Build realclean
C:\cpanplus\5.8.2\build\Module-Build>Build realclean
Deleting pod2htmd.tmp
Deleting pod2htmi.tmp
Deleting blib
Deleting _build
Deleting Build
Then there is an NLS message about the right way to call START.
And Build.bat is still there.
> Build test --test-files t/compat.t --verbose
I don't get any output from that line.
> >I also got lots of messages about configuration being created
> >with 0.2611, but we are now using 0.2707, which I get on Linux
> >too.
> This is odd. Do you have multiple perls in your PATH?
No.
> Can you post the
> output with the warnings?
Here is the tail of the Build test output.
t\compat..........NOK 15 * ERROR: Configuration was initially created with Modul
e::Build version '0.2611',
but we are now using version '0.2707'. Please re-run the Build.PL or Makefil
e.PL script.
DMAKE.EXE: Error code 9, while making 'test'
# Failed test (t\compat.t at line 63)
# Failed test (t\compat.t at line 64)
t\compat..........NOK 17# 'DMAKE TEST
# C:ERL\5.8.2\BIN\MSWIN32-X86-MULTI-THREADERL.EXE BUILD --MAKEFILE_ENV_MACRO
S 1 TEST
# '
# doesn't match '(?-xism:DONE\.|SUCCESS)'
* ERROR: Configuration was initially created with Module::Build version '0.2611
',
but we are now using version '0.2707'. Please re-run the Build.PL or Makefil
e.PL script.
DMAKE.EXE: Error code 9, while making 'realclean'
# Failed test (t\compat.t at line 66)
t\compat..........ok 20/60 * ERROR: Configuration was initially created with Mod
ule::Build version '0.2611',
but we are now using version '0.2707'. Please re-run the Build.PL or Makefil
e.PL script.
DMAKE.EXE: Error code 9, while making 'realclean'
# Failed test (t\compat.t at line 185)
t\compat..........ok 24/60
Grepping for 2611 with cygwin,
$ ls
Build.PL Changes MANIFEST.SKIP README doc_check.pl patches website
Build.bat INSTALL META.yml TODO inc scripts
CVS MANIFEST Makefile.PL configs lib t
$ grep -r 2611 *
t/_tmp/Simple/_build/build_params: 'mb_version' => '0.2611',
> >This is a MinGW perl 5.8.2 with dmake, etc.
C:\cpanplus\5.8.2\build\Module-Build>echo %PATH%
C:\CYGWIN\BIN;C:ERL\5.8.2\BIN\MSWIN32-X86-MULTI-THREAD;C:ERL\5.8.2\BIN;C:\M\
BIN;C:ROGRA~1\GPG;C:ROGRA~1\THINKPAD\UTILIT~1;C:\WINDOWS;C:\WINDOWS;C:\WINDO
WS\COMMAND;C:ROGRAM FILES\SUBVERSION\BIN
C:\cpanplus\5.8.2\build\Module-Build>perl -v
This is perl, v5.8.2 built for MSWin32-x86-multi-thread
You can see some cut and paste errors with \P.
-
Dr Bean If there is one thing we learn from the
study of language learning, it is that...
|
|
From: Chris D. <ch...@cl...> - 2006-02-21 13:27:13
|
On Feb 21, 2006, at 3:13 AM, Randy W. Sims wrote: > This is an error in M::B::ModuleInfo. It should be stricter when > looking at expressions, only evaling expressions that are > assignments (= vs =~). The following fix has been applied. Thanks Randy! That does the trick. For the sake of distribution on CPAN, I've changed my module from C< $SOAP::Lite::VERSION> to C<SOAP::Lite->VERSION()> which works around the problem with older M::Bs Chris -- Chris Dolan, Software Developer, Clotho Advanced Media Inc. 608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703 vCard: http://www.chrisdolan.net/ChrisDolan.vcf Clotho Advanced Media, Inc. - Creators of MediaLandscape Software (http://www.media-landscape.com/) and partners in the revolutionary Croquet project (http://www.opencroquet.org/) |
|
From: Randy W. S. <ml...@th...> - 2006-02-21 09:27:35
|
Yitzchak Scott-Thoennes wrote:
> Cygwin programs when run by non-cygwin programs do not interpret \" as
> an escaped " except within "". This results in errors like the
> following when using cygwin gcc in "mingw" mode:
>
> gcc -mno-cygwin -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX -s -O2 -DXS_VERSION=\"0.01\" -DVERSION=\"0.01\" -I"..\..\..\lib\CORE" -I"C:\MinGW\include" -o "lib\Simple.o" "lib\Simple.c"
> gcc: no input files
> error building dll file from 'lib\Simple.c' at C:\cygwin\home\sthoenna\bleadperl\wp\lib/ExtUtils/CBuilder/Platform/Windows.pm line 143.
>
> The first backslash in -DXS_VERSION=\"0.01\" is treated as a literal
> backslash, and the " after it starts a quoted string, resulting in gcc
> getting everything after -O2 as a single argument:
>
> -DXS_VERSION=\0.01" -DVERSION="0.01" -I......libCORE -IC:MinGWinclude -o libSimple.o libSimple.c
>
> The following patch fixes this and in theory should not cause any
> problems.
Thanks. I've checked this into CVS.
Randy.
> --- lib/ExtUtils/CBuilder/Platform/Windows.pm.orig 2005-10-04 04:32:20.000000000 -0700
> +++ lib/ExtUtils/CBuilder/Platform/Windows.pm 2006-01-09 19:55:07.807132800 -0800
> @@ -93,7 +93,7 @@
> sub arg_defines {
> my ($self, %args) = @_;
> s/"/\\"/g foreach values %args;
> - return map "-D$_=$args{$_}", keys %args;
> + return map qq{"-D$_=$args{$_}"}, keys %args;
> }
|
|
From: Randy W. S. <ml...@th...> - 2006-02-21 09:13:50
|
Chris Dolan wrote:
> In my CAM::SOAPApp module, I need to test which version of SOAP::Lite
> is installed. If $SOAP::Lite::VERSION is '0.66', '0.66.1' or '0.67',
> then I need to apply a workaround. I implemented the test like this:
>
> if ($SOAP::Lite::VERSION =~ m/\A 0.6[67] /xms)
> {
> ... bunch of workaround code ...
> }
>
> When I run my Build.PL, I get this error:
>
> Error evaling version line 'q# Hide from _packages_inside()
> #; package Module::Build::ModuleInfo::_version;
> no strict;
>
> local $SOAP::Lite::VERSION;
> $SOAP::Lite::VERSION=undef; do {
> if ($SOAP::Lite::VERSION =~ m/\A
> 0.6[67] /xms)
> }; $SOAP::Lite::VERSION
> ' in /Users/chris/Work/clotho/CAM-SOAPApp/lib/CAM/
> SOAPApp.pm: syntax error at (eval 21) line 8, at EOF
>
>
> Is this my fault for coding the $VERSION test poorly, or is this a bug
> in Module::Build::ModuleInfo? I *think* this error is because I'm
> using a $VERSION in a multi-line statement, but I'm at a loss as to how
> else I should write my conditional.
This is an error in M::B::ModuleInfo. It should be stricter when looking
at expressions, only evaling expressions that are assignments (= vs =~).
The following fix has been applied.
Thanks,
Randy.
Index: lib/Module/Build/ModuleInfo.pm
===================================================================
RCS file:
/cvsroot/module-build/Module-Build/lib/Module/Build/ModuleInfo.pm,v
retrieving revision 1.17
diff -u -r1.17 ModuleInfo.pm
--- lib/Module/Build/ModuleInfo.pm 3 Feb 2006 04:20:07 -0000 1.17
+++ lib/Module/Build/ModuleInfo.pm 21 Feb 2006 08:55:26 -0000
@@ -37,7 +37,7 @@
$VARNAME_REGEXP # without parens
)
\s*
- =[^=] # = but not ==
+ =[^=~] # = but not ==, nor =~
/x;
|
|
From: Ron S. <ro...@sa...> - 2006-02-21 08:44:35
|
On Mon, 20 Feb 2006 22:04:47 -0500, Randy W. Sims wrote: Hi Randy Win2K here. Looks good. > <http://thepierianspring.org/perl/Module-Build.tar.gz> (1) I hope this is irrelevant: C:\Temp\Module-Build>perl Build.PL Checking whether your kit is complete... WARNING: the following files are missing in your kit: t/bundled/Test/Builder.pm t/bundled/Test/More.pm t/bundled/Test/Simple.pm (2) perl Build test gives: C:\Temp\Module-Build>perl Build test t\basic...........ok t\compat..........ok t\destinations....ok 8/92 skipped: various reasons t\ext.............ok t\extend..........ok t\files...........ok t\install.........ok t\manifypods......ok t\metadata........ok t\metadata2.......ok t\moduleinfo......ok t\notes...........ok t\parents.........ok t\pod_parser......ok t\ppm.............skipped all skipped: C_support not enabled t\runthrough......ok t\signature.......skipped all skipped: $ENV{TEST_SIGNATURE} is not set t\tilde...........ok t\versions........ok t\xs..............skipped all skipped: C_support not enabled All tests successful, 3 tests and 8 subtests skipped. Files=3D20, Tests=3D626, 64 wallclock secs ( 0.00 cusr + 0.00 csys =3D 0.00= CPU) -- Cheers Ron Savage, ro...@sa... on 21/02/2006 http://savage.net.au/index.html Let the record show: Microsoft is not an Australian company |
|
From: Randy W. S. <ml...@th...> - 2006-02-21 08:37:19
|
Tyler MacDonald wrote: > I just tried installing a package I'm working on and got notified that I had > an older version of the package installed. I was advised to run "make > install UNINST=1" to get rid of this. That seemed odd to me, since I'm using > Module::Build, not ExtUtils::MakeMaker. But I decided to try "Build install > UNINST=1" and this is what I got: Where you installing with CPAN.pm? If its prefer_installer config option is set to EUMM, it will use the Makefile.PL in preference to the Build.PL. Recent versions of M::B (?>=0.26) will translate more common options: make install UNINST=1 will be translated and passed through to M::B as `Build install uninst=1` > ## Running 'make install UNINST=1' will unlink all those files for you. This is output from ExtUtils::Install. This module is currently part of ExtUtils::MakeMaker, but we use it for installing modules. It still has some cruft that needs to be cleaned up so that it can be used by other tools like M::B. > It turned out I had to write "uninst=1" (lower case). I think we should > either support the uppercase method, or somehow change the warning message > that is displayed. In fact, doing both might be preferable. :) The first > option is trivial ... I think the second one falls into this domain: The first option would set bad precedent. We'd then have people wanting direct translations of all MakeMakeresqe options. verbose, prefix, etc. I think we just need to learn to work better with existing modules (ExtUtils::Install) and tools (CPAN.pm, CPANPLUS). Randy. |
|
From: Randy W. S. <ml...@th...> - 2006-02-21 07:57:22
|
Dr Bean wrote: > I downloaded Randy's tarball, and ran perl Build.PL, .\perl, > .\perl test. > > .\perl seemed to run OK. It didn't produce any error messages, > but .\perl test has hung on test 24 of t\compat.t I don't see anything that stands out as related to changes I made. From the distro directory, can you run perl Build.PL Build realclean Are there any errors? Was the 'Build.bat' file deleted? Also, t/compat.t is slow, very slow on older systems. How long did you allow it run? What is the output of: Build test --test-files t/compat.t --verbose > I also got lots of messages about configuration being created > with 0.2611, but we are now using 0.2707, which I get on Linux > too. This is odd. Do you have multiple perls in your PATH? Can you post the output with the warnings? > This is a MinGW perl 5.8.2 with dmake, etc. Thanks for reporting your results. Randy. |
|
From: Dr B. <la...@ms...> - 2006-02-21 05:17:42
|
I downloaded Randy's tarball, and ran perl Build.PL, .\perl,
.\perl test.
.\perl seemed to run OK. It didn't produce any error messages,
but .\perl test has hung on test 24 of t\compat.t
I also got lots of messages about configuration being created
with 0.2611, but we are now using 0.2707, which I get on Linux
too.
This is a MinGW perl 5.8.2 with dmake, etc.
--
Dr Bean The teacher as the monkey in the works.
Intervention without understanding.
--Dr Bean
|
|
From: Randy W. S. <Ra...@Th...> - 2006-02-21 03:04:43
|
demerphq wrote: > On 2/2/06, Randy W. Sims <ml...@th...> wrote: >>> BTW, there is one annoying thing about self deletion of the .cmd/.bat >>> Build file. When control returns to the shell it raises a warning >>> about the batch file unexpected ending. Its not an issue, but it is >>> inelegant so figuring out how to make it go away would be nice. >> This is the only issue holding me up. I'm going to do some experimenting >> and research to see if that annoying message can be eliminated somehow. > > Yeah. Its an interesting question. Ill look into it too. I think this is now solved in CVS thanks to help from folks over on alt.msdos.batch. It should work on all NT variants, hopefully 9x also, but that hasn't been tested-I don't have access to anything that old. Anyone willing to test can grab the latest from cvs or I've got a snapshot at: <http://thepierianspring.org/perl/Module-Build.tar.gz> Thanks, Randy. |
|
From: Tyler M. <ty...@yi...> - 2006-02-21 01:28:39
|
I just tried installing a package I'm working on and got notified that I had an older version of the package installed. I was advised to run "make install UNINST=1" to get rid of this. That seemed odd to me, since I'm using Module::Build, not ExtUtils::MakeMaker. But I decided to try "Build install UNINST=1" and this is what I got: pipewrench:/home/faraway/dev/Apache2-AUS# ./Build install UNINST=1 Skipping /usr/local/share/perl/5.8.8/Apache2/AUS.pm (unchanged) Skipping /usr/local/share/perl/5.8.8/Apache2/AUS/Util.pm (unchanged) Skipping /usr/local/share/perl/5.8.8/Apache2/AUS/RequestRec.pm (unchanged) Skipping /usr/local/man/man3/Apache2::AUS.3pm (unchanged) Writing /usr/local/lib/perl/5.8.8/auto/Apache2/AUS/.packlist ## Differing version of Apache2/AUS.pm found. You might like to rm /usr/local/share/perl/5.8.7/Apache2/AUS.pm ## Differing version of Apache2/AUS/Util.pm found. You might like to rm /usr/local/share/perl/5.8.7/Apache2/AUS/Util.pm ## Running 'make install UNINST=1' will unlink all those files for you. It turned out I had to write "uninst=1" (lower case). I think we should either support the uppercase method, or somehow change the warning message that is displayed. In fact, doing both might be preferable. :) The first option is trivial ... I think the second one falls into this domain: http://www.makemaker.org/wiki/index.cgi?ModulesForSale Thanks, Tyler |
|
From: Chris D. <ch...@cl...> - 2006-02-20 21:00:23
|
In my CAM::SOAPApp module, I need to test which version of SOAP::Lite
is installed. If $SOAP::Lite::VERSION is '0.66', '0.66.1' or '0.67',
then I need to apply a workaround. I implemented the test like this:
if ($SOAP::Lite::VERSION =~ m/\A 0.6[67] /xms)
{
... bunch of workaround code ...
}
When I run my Build.PL, I get this error:
Error evaling version line 'q# Hide from _packages_inside()
#; package Module::Build::ModuleInfo::_version;
no strict;
local $SOAP::Lite::VERSION;
$SOAP::Lite::VERSION=undef; do {
if ($SOAP::Lite::VERSION =~ m/\A
0.6[67] /xms)
}; $SOAP::Lite::VERSION
' in /Users/chris/Work/clotho/CAM-SOAPApp/lib/CAM/
SOAPApp.pm: syntax error at (eval 21) line 8, at EOF
Is this my fault for coding the $VERSION test poorly, or is this a
bug in Module::Build::ModuleInfo? I *think* this error is because
I'm using a $VERSION in a multi-line statement, but I'm at a loss as
to how else I should write my conditional.
Thanks much,
Chris
--
Chris Dolan, Software Developer, Clotho Advanced Media Inc.
608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703
vCard: http://www.chrisdolan.net/ChrisDolan.vcf
Clotho Advanced Media, Inc. - Creators of MediaLandscape Software
(http://www.media-landscape.com/) and partners in the revolutionary
Croquet project (http://www.opencroquet.org/)
|
|
From: John P. <jpe...@ro...> - 2006-02-20 16:10:12
|
I've released a beta of version.pm to CPAN that includes the following:
1) code to correctly detect the lack of a working C compiler and install the
pure Perl module instead (overloading the have_c_compiler sub);
2) An overloaded UNIVERSAL::VERSION for the pure Perl module that DTRT.
I've tested this on Linux and Cygwin using M::B 0.2611 and 0.27_03 (my Win32
machine seems to have forgotten it ever had Perl installed). I'd really
appreciate any other testing that people can get for me (specifically where you
don't have a compiler).
I'll test it on Win32 and VMS when I get into work tomorrow.
Thanks in advance...
-------- Original Message --------
The uploaded file
version-0.56_03.tar.gz
has entered CPAN as
file: $CPAN/authors/id/J/JP/JPEACOCK/version-0.56_03.tar.gz
size: 36625 bytes
md5: 6618c17d86447603af0ceafb73f1c5b1
John
--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747
|
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-02-20 06:10:24
|
On Sun, Feb 19, 2006 at 11:20:23AM -0800, Yitzchak Scott-Thoennes wrote: > Has anyone familiar with DistGen looked at what Craig is doing? > Can anyone offer any assistance? > > More comments inline. > > On Sun, Feb 05, 2006 at 06:10:58PM -0600, Craig A. Berry wrote: > > At 3:39 PM -0800 2/5/06, Yitzchak Scott-Thoennes wrote: > > > > >Any progress on this front? Given that this is just for purposes of > > >running tests, maybe here the hash keys should always be lowercased? > > > > > >The previous patch to add Module::Build no longer applies cleanly; > > > > > >http://zipcon.net/~sthoenna/mbaddfull270701.patch > > > > > >is updated to match bleadperl and what's currently in cvs for MB. > > > > I'll try to look at that again soon -- too many projects in progress > > at once. I did some hacking with Tie:CPHash from CPAN and got a bit > > farther. A still not fully working diff of DistGen.pm is at the end > > of this message. I'm now getting, for example: > > > > $ perl -"I[-.lib]" [-.lib.module.build.t]tilde.t > > 1..11 > > Warning: Removing existing directory 'D0:[CRAIG.perl.t._tmp.Simple]' > > Changed file 't/basic.t'. > > Changed file 'lib/Simple.pm'. > > Changed file 'Build.PL'. > > Splitting '[]' > > Setting directory name '[]' in %names > > Splitting '[.t]' > > Setting directory name '[.t]' in %names > > Setting directory name '[.t]' in %names > > Splitting '[.lib]' > > Setting directory name '[.lib]' in %names > > Setting directory name '[.lib]' in %names > > Splitting '[]' > > Setting directory name '[]' in %names > > Removing 'lib' > > Removing 't' > > Can't call method "install_base" on an undefined value at [-.lib.module.build.t]tilde.t line 44. > > # No tests run! > > > > I think the next hurdle is that File::Find is returning directory > > names with no attached distinguishing punctuation (C<lib> or C<t>) > > but the names that we've cached do have that punctuation (C<[.lib]> > > or C<[.t]>). File::Spec->canonpath does not normalize that: > > > > $ perl -"MFile::Spec" -e "print File::Spec->canonpath('[.lib]');" > > [.lib] > > $ perl -"MFile::Spec" -e "print File::Spec->canonpath('lib');" > > lib > > > > So on VMS we'll have to get more aggressive about caching directory > > names in the same form that we'll be looking them up. Otherwise we > > don't recognize directories that we want to keep and we end up > > deleting before they are even used. > > > > --- DistGen.pm;2 Thu Jan 26 18:48:29 2006 > > +++ DistGen.pm Sun Jan 29 15:58:55 2006 > > @@ -5,7 +5,7 @@ > > use vars qw( $VERSION $VERBOSE ); > > > > $VERSION = '0.01'; > > -$VERBOSE = 0; > > +$VERBOSE = 1; > > > > > > use Cwd (); > > @@ -14,6 +14,7 @@ > > use File::Path (); > > use File::Spec (); > > use IO::File (); > > +use Tie::CPHash; > > > > sub new { > > my $package = shift; > > @@ -29,6 +30,10 @@ > > ); > > my $self = bless( \%data, $package ); > > > > + tie %{$self->{filedata}}, 'Tie::CPHash'; > > + > > + tie %{$self->{pending}{change}}, 'Tie::CPHash'; > > + > > if ( -d $self->dirname ) { > > warn "Warning: Removing existing directory '@{[$self->dirname]}'\n"; > > $self->remove; > > @@ -280,6 +285,7 @@ > > } > > > > my %names; > > + tie %names, 'Tie::CPHash'; > > foreach my $file ( keys %{$self->{filedata}} ) { > > my $filename = $self->_real_filename( $file ); > > my ($vol, $dirname, $f) = File::Spec->splitpath( $filename ); > > @@ -288,10 +294,16 @@ > > > > $names{$filename} = 0; > > > > + print "Splitting '$dirname'\n" if $VERBOSE; > > my @dirs = File::Spec->splitdir( $dirname ); > > while ( @dirs ) { > > - my $dir = File::Spec->catdir( @dirs ); > > - $names{$dir} = 0; > > + my $dir = ( scalar(@dirs) == 1 > > + ? $dirname > > + : File::Spec->catdir( @dirs ) ); > > + if (length $dir) { > > + print "Setting directory name '$dir' in \%names\n" if $VERBOSE; > > + $names{$dir} = 0; > > + } > > pop( @dirs ); > > } > > } > > @@ -299,11 +311,13 @@ > > File::Find::finddepth( sub { > > my $name = File::Spec->canonpath( $File::Find::name ); > > > > + $name =~ s/\.\z// if $^O eq 'VMS'; > > + > > if ( not exists $names{$name} ) { > > Wild stab in the dark: > > if (! ( exists $names{$name} || > $^O eq 'VMS' && -d $name && exists $names{"[.$name]"} ) ) { > > It doesn't have to be pretty, it just has to work. > > > print "Removing '$name'\n" if $VERBOSE; > > File::Path::rmtree( $_ ); > > } > > - }, File::Spec->curdir ); > > + }, './' ); > > Why not curdir? > > > > > chdir( $here ); > > } In case it helps move things further along, here's Craig's stuff as a patch to CVS, with Tie::CPHash added. Passes all tests using cygwin and windows ActivePerl 5.8.7. I don't see any reason not to apply it. (I made the last change be for VMS only.) diff -ruN Module-Build-0.27_0702-orig/MANIFEST Module-Build-0.27_0702/MANIFEST --- Module-Build-0.27_0702-orig/MANIFEST 2006-02-19 21:11:45.000000000 +0000 +++ Module-Build-0.27_0702/MANIFEST 2006-02-19 21:34:24.921875000 +0000 @@ -33,6 +33,7 @@ t/bundled/Test/Builder.pm t/bundled/Test/More.pm t/bundled/Test/Simple.pm +t/bundled/Tie/CPHash.pm t/compat.t t/destinations.t t/ext.t diff -ruN Module-Build-0.27_0702-orig/t/bundled/Tie/CPHash.pm Module-Build-0.27_0702/t/bundled/Tie/CPHash.pm --- Module-Build-0.27_0702-orig/t/bundled/Tie/CPHash.pm 1970-01-01 00:00:00.000000000 +0000 +++ Module-Build-0.27_0702/t/bundled/Tie/CPHash.pm 2006-02-19 21:33:50.562500000 +0000 @@ -0,0 +1,189 @@ +#--------------------------------------------------------------------- +package Tie::CPHash; +# +# Copyright 1997 Christopher J. Madsen +# +# Author: Christopher J. Madsen <chr...@ge...> +# Created: 08 Nov 1997 +# Version: 1.001 (25-Oct-1998) +# +# This program is free software; you can redistribute it and/or modify +# it under the same terms as Perl itself. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the +# GNU General Public License or the Artistic License for more details. +# +# Case preserving but case insensitive hash +#--------------------------------------------------------------------- + +require 5.000; +use strict; +use vars qw(@ISA $VERSION); + +@ISA = qw(); + +#===================================================================== +# Package Global Variables: + +BEGIN +{ + # Convert RCS revision number to d.ddd format: + $VERSION = sprintf('%d.%03d', '1.001 ' =~ /(\d+)\.(\d+)/); +} # end BEGIN + +#===================================================================== +# Tied Methods: +#--------------------------------------------------------------------- +# TIEHASH classname +# The method invoked by the command `tie %hash, classname'. +# Associates a new hash instance with the specified class. + +sub TIEHASH +{ + bless {}, $_[0]; +} # end TIEHASH + +#--------------------------------------------------------------------- +# STORE this, key, value +# Store datum *value* into *key* for the tied hash *this*. + +sub STORE +{ + $_[0]->{lc $_[1]} = [ $_[1], $_[2] ]; +} # end STORE + +#--------------------------------------------------------------------- +# FETCH this, key +# Retrieve the datum in *key* for the tied hash *this*. + +sub FETCH +{ + my $v = $_[0]->{lc $_[1]}; + ($v ? $v->[1] : undef); +} # end FETCH + +#--------------------------------------------------------------------- +# FIRSTKEY this +# Return the (key, value) pair for the first key in the hash. + +sub FIRSTKEY +{ + my $a = scalar keys %{$_[0]}; + &NEXTKEY; +} # end FIRSTKEY + +#--------------------------------------------------------------------- +# NEXTKEY this, lastkey +# Return the next (key, value) pair for the hash. + +sub NEXTKEY +{ + my $v = (each %{$_[0]})[1]; + ($v ? $v->[0] : undef ); +} # end NEXTKEY + +#--------------------------------------------------------------------- +# EXISTS this, key +# Verify that *key* exists with the tied hash *this*. + +sub EXISTS +{ + exists $_[0]->{lc $_[1]}; +} # end EXISTS + +#--------------------------------------------------------------------- +# DELETE this, key +# Delete the key *key* from the tied hash *this*. +# Returns the old value, or undef if it didn't exist. + +sub DELETE +{ + my $v = delete $_[0]->{lc $_[1]}; + ($v ? $v->[1] : undef); +} # end DELETE + +#--------------------------------------------------------------------- +# CLEAR this +# Clear all values from the tied hash *this*. + +sub CLEAR +{ + %{$_[0]} = (); +} # end CLEAR + +#===================================================================== +# Other Methods: +#--------------------------------------------------------------------- +# Return the case of KEY. + +sub key +{ + my $v = $_[0]->{lc $_[1]}; + ($v ? $v->[0] : undef); +} + +#===================================================================== +# Package Return Value: + +1; + +__END__ + +=head1 NAME + +Tie::CPHash - Case preserving but case insensitive hash table + +=head1 SYNOPSIS + + require Tie::CPHash; + tie %cphash, 'Tie::CPHash'; + + $cphash{'Hello World'} = 'Hi there!'; + printf("The key `%s' was used to store `%s'.\n", + tied(%cphash)->key('HELLO WORLD'), + $cphash{'HELLO world'}); + +=head1 DESCRIPTION + +The B<Tie::CPHash> provides a hash table that is case preserving but +case insensitive. This means that + + $cphash{KEY} $cphash{key} + $cphash{Key} $cphash{keY} + +all refer to the same entry. Also, the hash remembers which form of +the key was last used to store the entry. The C<keys> and C<each> +functions will return the key that was used to set the value. + +An example should make this clear: + + tie %h, 'Tie::CPHash'; + $h{Hello} = 'World'; + print $h{HELLO}; # Prints 'World' + print keys(%h); # Prints 'Hello' + $h{HELLO} = 'WORLD'; + print $h{hello}; # Prints 'WORLD' + print keys(%h); # Prints 'HELLO' + +The additional C<key> method lets you fetch the case of a specific key: + + # When run after the previous example, this prints 'HELLO': + print tied(%h)->key('Hello'); + +(The C<tied> function returns the object that C<%h> is tied to.) + +If you need a case insensitive hash, but don't need to preserve case, +just use C<$hash{lc $key}> instead of C<$hash{$key}>. This has a lot +less overhead than B<Tie::CPHash>. + +=head1 AUTHOR + +Christopher J. Madsen E<lt>F<chr...@ge...>E<gt> + +=cut + +# Local Variables: +# tmtrack-file-task: "Tie::CPHash.pm" +# End: diff -ruN Module-Build-0.27_0702-orig/t/lib/DistGen.pm Module-Build-0.27_0702/t/lib/DistGen.pm --- Module-Build-0.27_0702-orig/t/lib/DistGen.pm 2006-02-19 21:11:45.000000000 +0000 +++ Module-Build-0.27_0702/t/lib/DistGen.pm 2006-02-20 05:29:32.093750000 +0000 @@ -14,6 +14,7 @@ use File::Path (); use File::Spec (); use IO::File (); +use Tie::CPHash; sub new { my $package = shift; @@ -29,6 +30,10 @@ ); my $self = bless( \%data, $package ); + tie %{$self->{filedata}}, 'Tie::CPHash'; + + tie %{$self->{pending}{change}}, 'Tie::CPHash'; + if ( -d $self->dirname ) { warn "Warning: Removing existing directory '@{[$self->dirname]}'\n"; $self->remove; @@ -280,16 +285,23 @@ } my %names; + tie %names, 'Tie::CPHash'; foreach my $file ( keys %{$self->{filedata}} ) { my $filename = $self->_real_filename( $file ); my $dirname = File::Basename::dirname( $filename ); $names{$filename} = 0; + print "Splitting '$dirname'\n" if $VERBOSE; my @dirs = File::Spec->splitdir( $dirname ); while ( @dirs ) { - my $dir = File::Spec->catdir( @dirs ); - $names{$dir} = 0; + my $dir = ( scalar(@dirs) == 1 + ? $dirname + : File::Spec->catdir( @dirs ) ); + if (length $dir) { + print "Setting directory name '$dir' in \%names\n" if $VERBOSE; + $names{$dir} = 0; + } pop( @dirs ); } } @@ -297,11 +309,13 @@ File::Find::finddepth( sub { my $name = File::Spec->canonpath( $File::Find::name ); + $name =~ s/\.\z// if $^O eq 'VMS'; + if ( not exists $names{$name} ) { print "Removing '$name'\n" if $VERBOSE; File::Path::rmtree( $_ ); } - }, File::Spec->curdir ); + }, ($^O eq "VMS" ? './' : File::Spec->curdir) ); chdir( $here ); } |
|
From: Stephen A. <spa...@gm...> - 2006-02-19 21:52:02
|
... > And (as has already been discussed ad nauseam) there is no such thing > as a way to list a pre-Build.PL/Makefile.PL requirement (except with > newer tools that read META.yml iff you have YAML installed). > Though I see a message[*] from Ken that he apparently intends to fix this= . > I have no idea how he'd go about this, though. ... It has already been stated that the subset of the YAML specification actual= ly needed by Module::Build is quite limited. Why not write a module (Module::Build::YAML) which is included in the M::B distribution which supplies all of the YAML functionality required by M::B. Then there would never again be a system which had M::B but did not have enough YAML support in order to support its functions? If people thought this was a good idea (and the solution to some of these problems), I would be happy to write it. (But it's not so hard, and I imagi= ne others could write it too and not have to wait for me.) Stephen |
|
From: John P. <jpe...@ro...> - 2006-02-19 21:35:55
|
Yitzchak Scott-Thoennes wrote: > Yes. I'm not saying you should stick with EU::MM, I'd just like to > know why you aren't. A) I'm moving all of my modules to M::B (only Math::FixedPrecision is left); B) I've been using M::B with version.pm since May 2005 and (apart from recent $author precipitated failures) no one has complained (except for AdamK, which seems to be at least partly philosophical in nature). I don't want to go through the hassle of subclassing EU::MM to perform the kind of sophisticated build behavior that I'm trying to do (so far unsuccessfully) with version.pm (vis automatically choose the pure Perl or XS mode). John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747 |
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-02-19 19:39:17
|
On Sun, Feb 19, 2006 at 02:27:02PM -0500, John Peacock wrote: > Yitzchak Scott-Thoennes wrote: > > No, I meant the question I asked. I went to install version to try to > > play with yaml_dump, and was really surprised at the dependency. > > version uses Module::Build for its installer. How can it not be dependent on > M::B? Or are you another person wondering why I would abandon the wonderful > EU::MM API. Yes. I'm not saying you should stick with EU::MM, I'd just like to know why you aren't. |
|
From: John P. <jpe...@ro...> - 2006-02-19 19:26:46
|
Yitzchak Scott-Thoennes wrote: > No, I meant the question I asked. I went to install version to try to > play with yaml_dump, and was really surprised at the dependency. version uses Module::Build for its installer. How can it not be dependent on M::B? Or are you another person wondering why I would abandon the wonderful EU::MM API. John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747 |
|
From: John P. <jpe...@ro...> - 2006-02-19 19:26:25
|
Yitzchak Scott-Thoennes wrote: > On Sun, Feb 19, 2006 at 10:31:15AM -0500, John Peacock wrote: >> I tried that and could get YAML to call the version::yaml_dump routine. > > Do you mean couldn't? Yes (new keyboard). YAML-0.39 doesn't automatically call version::yaml_dump() and I could not read the invisible documentation on how to use Bless() to cause yaml_dump to be executed. Example code welcome... John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747 |
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-02-19 19:21:05
|
Has anyone familiar with DistGen looked at what Craig is doing? Can anyone offer any assistance? More comments inline. On Sun, Feb 05, 2006 at 06:10:58PM -0600, Craig A. Berry wrote: > At 3:39 PM -0800 2/5/06, Yitzchak Scott-Thoennes wrote: > > >Any progress on this front? Given that this is just for purposes of > >running tests, maybe here the hash keys should always be lowercased? > > > >The previous patch to add Module::Build no longer applies cleanly; > > > >http://zipcon.net/~sthoenna/mbaddfull270701.patch > > > >is updated to match bleadperl and what's currently in cvs for MB. > > I'll try to look at that again soon -- too many projects in progress > at once. I did some hacking with Tie:CPHash from CPAN and got a bit > farther. A still not fully working diff of DistGen.pm is at the end > of this message. I'm now getting, for example: > > $ perl -"I[-.lib]" [-.lib.module.build.t]tilde.t > 1..11 > Warning: Removing existing directory 'D0:[CRAIG.perl.t._tmp.Simple]' > Changed file 't/basic.t'. > Changed file 'lib/Simple.pm'. > Changed file 'Build.PL'. > Splitting '[]' > Setting directory name '[]' in %names > Splitting '[.t]' > Setting directory name '[.t]' in %names > Setting directory name '[.t]' in %names > Splitting '[.lib]' > Setting directory name '[.lib]' in %names > Setting directory name '[.lib]' in %names > Splitting '[]' > Setting directory name '[]' in %names > Removing 'lib' > Removing 't' > Can't call method "install_base" on an undefined value at [-.lib.module.build.t]tilde.t line 44. > # No tests run! > > I think the next hurdle is that File::Find is returning directory > names with no attached distinguishing punctuation (C<lib> or C<t>) > but the names that we've cached do have that punctuation (C<[.lib]> > or C<[.t]>). File::Spec->canonpath does not normalize that: > > $ perl -"MFile::Spec" -e "print File::Spec->canonpath('[.lib]');" > [.lib] > $ perl -"MFile::Spec" -e "print File::Spec->canonpath('lib');" > lib > > So on VMS we'll have to get more aggressive about caching directory > names in the same form that we'll be looking them up. Otherwise we > don't recognize directories that we want to keep and we end up > deleting before they are even used. > > --- DistGen.pm;2 Thu Jan 26 18:48:29 2006 > +++ DistGen.pm Sun Jan 29 15:58:55 2006 > @@ -5,7 +5,7 @@ > use vars qw( $VERSION $VERBOSE ); > > $VERSION = '0.01'; > -$VERBOSE = 0; > +$VERBOSE = 1; > > > use Cwd (); > @@ -14,6 +14,7 @@ > use File::Path (); > use File::Spec (); > use IO::File (); > +use Tie::CPHash; > > sub new { > my $package = shift; > @@ -29,6 +30,10 @@ > ); > my $self = bless( \%data, $package ); > > + tie %{$self->{filedata}}, 'Tie::CPHash'; > + > + tie %{$self->{pending}{change}}, 'Tie::CPHash'; > + > if ( -d $self->dirname ) { > warn "Warning: Removing existing directory '@{[$self->dirname]}'\n"; > $self->remove; > @@ -280,6 +285,7 @@ > } > > my %names; > + tie %names, 'Tie::CPHash'; > foreach my $file ( keys %{$self->{filedata}} ) { > my $filename = $self->_real_filename( $file ); > my ($vol, $dirname, $f) = File::Spec->splitpath( $filename ); > @@ -288,10 +294,16 @@ > > $names{$filename} = 0; > > + print "Splitting '$dirname'\n" if $VERBOSE; > my @dirs = File::Spec->splitdir( $dirname ); > while ( @dirs ) { > - my $dir = File::Spec->catdir( @dirs ); > - $names{$dir} = 0; > + my $dir = ( scalar(@dirs) == 1 > + ? $dirname > + : File::Spec->catdir( @dirs ) ); > + if (length $dir) { > + print "Setting directory name '$dir' in \%names\n" if $VERBOSE; > + $names{$dir} = 0; > + } > pop( @dirs ); > } > } > @@ -299,11 +311,13 @@ > File::Find::finddepth( sub { > my $name = File::Spec->canonpath( $File::Find::name ); > > + $name =~ s/\.\z// if $^O eq 'VMS'; > + > if ( not exists $names{$name} ) { Wild stab in the dark: if (! ( exists $names{$name} || $^O eq 'VMS' && -d $name && exists $names{"[.$name]"} ) ) { It doesn't have to be pretty, it just has to work. > print "Removing '$name'\n" if $VERBOSE; > File::Path::rmtree( $_ ); > } > - }, File::Spec->curdir ); > + }, './' ); Why not curdir? > > chdir( $here ); > } |
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-02-19 17:45:48
|
On Sun, Feb 19, 2006 at 10:31:15AM -0500, John Peacock wrote: > Yitzchak Scott-Thoennes wrote: > > Maybe I'm changing the topic a little, but *why* are you making > > version dependent on Module::Build? > > Reverse that. We are trying to make Module::Build use version.pm for all of its > internal version comparisons. > > > I don't like the idea of requiring YAML for non-module-authors at all. > > Maybe you could look more into declaring a version::yaml_dump routine > > that might work for YAML 0.3[5-9]? I'm sure the YAML people would be > > glad to give pointers. > > I tried that and could get YAML to call the version::yaml_dump routine. Do you mean couldn't? |
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-02-19 17:38:46
|
On Sun, Feb 19, 2006 at 11:53:45AM -0500, John Peacock wrote:
> This should have the correct behavior on machines without any C
> compiler at all:
For benefit of anyone else reading this, now or in the archives, I
want to emphasize that have_c_compiler doesn't check for "any C
compiler at all". It checks for ExtUtils::CBuilder being installed
and able to compile and link a sample library.
> === lib/Module/Build/Base.pm
> ==================================================================
> --- lib/Module/Build/Base.pm (revision 1834)
> +++ lib/Module/Build/Base.pm (local)
> @@ -3497,7 +3497,8 @@
> return $p->{have_compiler} if defined $p->{have_compiler};
>
> $self->log_verbose("Checking if compiler tools configured... ");
> - my $have = $self->_cbuilder->have_compiler;
> + my $have = eval { $self->_cbuilder->have_compiler };
> + $have = 0 if $@; # no compiler support possible
> $self->log_verbose($have ? "ok.\n" : "failed.\n");
> return $p->{have_compiler} = $have;
> }
>
> It's kind of not fair to provide a function testing whether there is an
> effective C compiler available and then die if there isn't (and no fallback
> either). :(
|
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-02-19 17:09:56
|
On Sun, Feb 19, 2006 at 10:31:15AM -0500, John Peacock wrote: > Yitzchak Scott-Thoennes wrote: > > Maybe I'm changing the topic a little, but *why* are you making > > version dependent on Module::Build? > > Reverse that. We are trying to make Module::Build use version.pm > for all of its internal version comparisons. No, I meant the question I asked. I went to install version to try to play with yaml_dump, and was really surprised at the dependency. |
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-02-19 17:08:27
|
On Sun, Feb 19, 2006 at 11:40:29AM -0500, John Peacock wrote: > Yitzchak Scott-Thoennes wrote: > > $ perl Build.PL > > Checking whether your kit is complete... > > Looks good > > > > Checking prerequisites... > > Looks good > > > > Module::Build is not configured with C_support at /usr/lib/perl5/site_perl/5.8/Module/Build/Base.pm line 3478. > > Bugger. How can I check for a C compiler if the test dies while trying to > determine if there is a C compiler because it won't create a c_builder object if > there isn't a C compiler? Arghhh! > > Expect version-0.56 RSN (with a completely new installer written in Python). :( It was my understanding that 0.27_* no longer directly check for a C-compiler, but depend on ExtUtils::CBuilder doing the check. So you need that as an additional pre-Build.PL/Makefile.PL requirement. And (as has already been discussed ad nauseam) there is no such thing as a way to list a pre-Build.PL/Makefile.PL requirement (except with newer tools that read META.yml iff you have YAML installed). Though I see a message[*] from Ken that he apparently intends to fix this. I have no idea how he'd go about this, though. * http://nntp.perl.org/group/perl.perl5.porters/109856 |
|
From: John P. <jpe...@ro...> - 2006-02-19 16:53:29
|
This should have the correct behavior on machines without any C compiler at all:
=== lib/Module/Build/Base.pm
==================================================================
--- lib/Module/Build/Base.pm (revision 1834)
+++ lib/Module/Build/Base.pm (local)
@@ -3497,7 +3497,8 @@
return $p->{have_compiler} if defined $p->{have_compiler};
$self->log_verbose("Checking if compiler tools configured... ");
- my $have = $self->_cbuilder->have_compiler;
+ my $have = eval { $self->_cbuilder->have_compiler };
+ $have = 0 if $@; # no compiler support possible
$self->log_verbose($have ? "ok.\n" : "failed.\n");
return $p->{have_compiler} = $have;
}
It's kind of not fair to provide a function testing whether there is an
effective C compiler available and then die if there isn't (and no fallback
either). :(
John
--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747
|
|
From: John P. <jpe...@ro...> - 2006-02-19 16:40:17
|
Yitzchak Scott-Thoennes wrote: > $ perl Build.PL > Checking whether your kit is complete... > Looks good > > Checking prerequisites... > Looks good > > Module::Build is not configured with C_support at /usr/lib/perl5/site_perl/5.8/Module/Build/Base.pm line 3478. Bugger. How can I check for a C compiler if the test dies while trying to determine if there is a C compiler because it won't create a c_builder object if there isn't a C compiler? Arghhh! Expect version-0.56 RSN (with a completely new installer written in Python). :( John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747 |