Thread: [Module::Build] Re: Module::Build status on VMS
Status: Beta
Brought to you by:
kwilliams
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-01-26 09:46:37
|
Just a few comments to start with. Have you had a chance to look at any of this? On Sat, Jan 21, 2006 at 07:16:08PM -0600, Craig A. Berry wrote: > At 3:49 AM -0800 1/19/06, Yitzchak Scott-Thoennes wrote: > >On Thu, Jan 19, 2006 at 06:34:30AM -0500, John E. Malmberg wrote: > > > >Would you be able to try out the patch adding Module::Build? > > > >It's at http://zipcon.net/~sthoenna/mbaddfull123.patch > > > >To prevent a known failure due to a Pod::Text bug, apply the > >workaround in http://nntp.perl.org/group/perl.perl5.porters/108338 > > I tested it against blead@26919. Complete harness output is below. > It may not be as bad as it looks in that it appears a handful of > issues recur repeatedly. It will take me some time to understand > Module::Build well enough to debug these. > > $ perl harness [-.lib.Module.Build.t]*.t > d0:[craig.perl.lib.module.build.t]basic...........ok 7/55 > Can't cd to D0:[CRAIG.perl.t._tmp.Simple]: no such file or directory Is there something wrong with that path name? The different case for D0 and CRAIG? The _ in _tmp? Most of the tests use lib/DistGen.pm to generate directories of test files and cd into them to run their tests. If that's not working, that's the first thing to try to fix. > # Looks like you planned 55 tests but only ran 13. > d0:[craig.perl.lib.module.build.t]basic...........dubious > Test returned status 44 (wstat 1024, 0x400) > (VMS status is 44) > DIED. FAILED tests 14-55 > Failed 42/55 tests, 23.64% okay (less 1 skipped test: 12 okay, 21.82%) > d0:[craig.perl.lib.module.build.t]compat..........skipped > all skipped: Don't know how to invoke 'make' compat.t tests that the different flavors of compatibility Makefile.PLs work with the "perl Makefile.PL; make" approach. Does VMS have $Config{make} set to something suitable? If so, perhaps the find_in_path($Config{make}) check is making this whole test skipped when it shouldn't be? > d0:[craig.perl.lib.module.build.t]destinations.... > * WARNING: Configuration was initially created with 'dsa0:[craig.perl.][000000]nd > bgperl.exe;3', > d0:[craig.perl.lib.module.build.t]destinations....NOK 26 > > # Failed test 'script destination' > # in d0:[craig.perl.lib.module.build.t]destinations.t at line 111. > # got: '[.foo.bar.gnu.bin]' > d0:[craig.perl.lib.module.build.t]destinations....NOK 29 > > # Failed test 'bin destination' > # in d0:[craig.perl.lib.module.build.t]destinations.t at line 111. > # got: '[.foo.bar.gnu.bin]' > # expected: '[.foo.bar.bin]' > Can't locate object method "eliminate_macros" via package "Module::Build" at /D0/CRAIG/PERL/lib/Module/Build/Platform/VMS.pm line 85 Hmm, looks like some code mistranslated from what makemaker did. And it looks like there's some kind of incestuous relationship between File::Spec and makemaker wrt eliminate_macros. Yuck. > . > # Looks like you planned 92 tests but only ran 34. > # Looks like you failed 2 tests of 34 run. > d0:[craig.perl.lib.module.build.t]destinations....dubious > Test returned status 44 (wstat 1024, 0x400) > (VMS status is 44) > DIED. FAILED tests 26, 29, 35-92 > Failed 60/92 tests, 34.78% okay > d0:[craig.perl.lib.module.build.t]ext.............NOK 92 > > # Failed test in d0:[craig.perl.lib.module.build.t]ext.t at line 100. > # 'dsa0:[craig.perl.][000000]ndbgperl.exe;3 -le print for @INC > # > # ' > # doesn't match '(?m-xis:^whosiewhatzit)' > # Looks like you failed 1 test of 92. > d0:[craig.perl.lib.module.build.t]ext.............dubious > Test returned status 44 (wstat 1024, 0x400) > (VMS status is 44) > DIED. FAILED test 92 > Failed 1/92 tests, 98.91% okay > d0:[craig.perl.lib.module.build.t]extend.......... > d0:[craig.perl.lib.module.build.t]extend..........ok 4/52 directory 'D0:[CRAIG.perl.t._tmp.Simple]' > > d0:[craig.perl.lib.module.build.t]extend..........NOK 7 > > d0:[craig.perl.lib.module.build.t]extend..........NOK 9 > > # Failed test in d0:[craig.perl.lib.module.build.t]extend.t at line 61. > # got: '0' > # expected: '2' > > # Failed test in d0:[craig.perl.lib.module.build.t]extend.t at line 62. > # got: undef > d0:[craig.perl.lib.module.build.t]extend..........NOK 10 > > # Failed test in d0:[craig.perl.lib.module.build.t]extend.t at line 63. > # got: undef > d0:[craig.perl.lib.module.build.t]extend..........NOK 11 > Use of uninitialized value $path in pattern match (m//) at ../lib/File/Spec/ > VMS.pm line 39. > Use of uninitialized value in transliteration (tr///) at ../lib/File/Spec/VMS.pm line 46. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 47. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 48. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 49. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 50. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 51. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 52. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 59. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 69. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 70. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 71. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 72. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 73. > Use of uninitialized value $path in string eq at ../lib/File/Spec/VMS.pm line 74. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 74. > Use of uninitialized value $dir in hash element at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm line 292. > Use of uninitialized value $path in pattern match (m//) at ../lib/File/Spec/VMS.pm line 39. > Use of uninitialized value in transliteration (tr///) at ../lib/File/Spec/VMS.pm line 46. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 47. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 48. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 49. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 50. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 51. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 52. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 59. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 69. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 70. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 71. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 72. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 73. > Use of uninitialized value $path in string eq at ../lib/File/Spec/VMS.pm line 74. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 74. > Use of uninitialized value $dir in hash element at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm line 292. > Can't cd to D0:[CRAIG.perl.t._tmp.Simple]: no such file or directory > # Looks like you planned 52 tests but only ran 11. > # Looks like you failed 5 tests of 11 run. > d0:[craig.perl.lib.module.build.t]extend..........dubious > Test returned status 44 (wstat 1024, 0x400) > (VMS status is 44) > DIED. FAILED tests 6-7, 9-52 > Failed 46/52 tests, 11.54% okay > d0:[craig.perl.lib.module.build.t]files........... > * WARNING: Configuration was initially created with 'dsa0:[craig.perl.][000000]nd > bgperl.exe;3', > d0:[craig.perl.lib.module.build.t]files...........ok 1/6 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp2/t/tmp1: director > y not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp2/t: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen. > pm line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp2: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm > line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp1: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm > line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm line > 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple/: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm line 3 > 20 > Can't remove directory /D0/CRAIG/perl/t/_tmp//simple/t/tmp2/t/tmp1: directory not empty at d0:[craig.perl.lib.module.build.t]files.t > line 67 > Can't remove directory /D0/CRAIG/perl/t/_tmp//simple/t/tmp2/t: directory not empty at d0:[craig.perl.lib.module.build.t]files.t line > 67 > Can't remove directory /D0/CRAIG/perl/t/_tmp//simple/t/tmp2: directory not empty at d0:[craig.perl.lib.module.build.t]files.t line 6 > 7 > Can't remove directory /D0/CRAIG/perl/t/_tmp//simple/t/tmp1: directory not empty at d0:[craig.perl.lib.module.build.t]files.t line 6 > 7 > Can't remove directory /D0/CRAIG/perl/t/_tmp//simple/t: directory not empty at d0:[craig.perl.lib.module.build.t]files.t line 67 > Can't remove directory /D0/CRAIG/perl/t/_tmp//simple: directory not empty at d0:[craig.perl.lib.module.build.t]files.t line 67 > d0:[craig.perl.lib.module.build.t]files...........ok ig.perl.lib.module.build.t]files.t line 67 > d0:[craig.perl.lib.module.build.t]install......... > Warning: Removing existing directory 'D0:[CRAIG.perl.t._tmp.Simple]' > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp2/t/tmp1: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/Dis > tGen.pm line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp2/t: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen. > pm line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp2: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm > line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp1: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm > line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm line > 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple/: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm line 3 > 20 > * WARNING: Configuration was initially created with 'dsa0:[craig.perl.][000000]ndbgperl.exe;3', > d0:[craig.perl.lib.module.build.t]install.........ok 1/34 > Use of uninitialized value in pattern match (m//) at /D0/CRAIG/PERL/lib/Mod > ule/Build/Base.pm line 2081. > Use of uninitialized value $current_mode in bitwise or (|) at /D0/CRAIG/PERL/lib/Module/Build/Base.pm line 1122. > Use of uninitialized value $fixedpath in substitution (s///) at ../lib/File/Spec/VMS.pm line 500. > Use of uninitialized value $path in pattern match (m//) at ../lib/File/Spec/VMS.pm line 39. > Use of uninitialized value in transliteration (tr///) at ../lib/File/Spec/VMS.pm line 46. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 47. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 48. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 49. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 50. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 51. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 52. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 59. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 69. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 70. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 71. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 72. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 73. > Use of uninitialized value $path in string eq at ../lib/File/Spec/VMS.pm line 74. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 74. > d0:[craig.perl.lib.module.build.t]install.........ok 2/34 pm line 249. > Use of uninitialized value $fixedpath in substitution (s///) at ../lib/File > /Spec/VMS.pm line 500. > Use of uninitialized value $path in pattern match (m//) at ../lib/File/Spec/VMS.pm line 39. > Use of uninitialized value in transliteration (tr///) at ../lib/File/Spec/VMS.pm line 46. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 47. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 48. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 49. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 50. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 51. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 52. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 59. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 69. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 70. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 71. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 72. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 73. > Use of uninitialized value $path in string eq at ../lib/File/Spec/VMS.pm line 74. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 74. > Use of uninitialized value $packlist in -e at d0:[craig.perl.lib.module.build.t]install.t line 82. > d0:[craig.perl.lib.module.build.t]install.........NOK 5 aig.perl.lib.module.build.t]install.t line 82. > > # Failed test ' should be written' > # in d0:[craig.perl.lib.module.build.t]install.t at line 82. > # got: undef > # expected: '1' > Use of uninitialized value in pattern match (m//) at /D0/CRAIG/PERL/lib/Module/Build/Base.pm line 2081. > Use of uninitialized value $current_mode in bitwise or (|) at /D0/CRAIG/PERL/lib/Module/Build/Base.pm line 1122. > Use of uninitialized value $fixedpath in substitution (s///) at ../lib/File/Spec/VMS.pm line 500. > Use of uninitialized value $path in pattern match (m//) at ../lib/File/Spec/VMS.pm line 39. > Use of uninitialized value in transliteration (tr///) at ../lib/File/Spec/VMS.pm line 46. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 47. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 48. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 49. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 50. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 51. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 52. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 59. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 69. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 70. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 71. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 72. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 73. > Use of uninitialized value $path in string eq at ../lib/File/Spec/VMS.pm line 74. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 74. > d0:[craig.perl.lib.module.build.t]install.........ok 6/34 pm line 249. > Use of uninitialized value in pattern match (m//) at /D0/CRAIG/PERL/lib/Mod > ule/Build/Base.pm line 2081. > Use of uninitialized value $current_mode in bitwise or (|) at /D0/CRAIG/PERL/lib/Module/Build/Base.pm line 1122. > Use of uninitialized value $fixedpath in substitution (s///) at ../lib/File/Spec/VMS.pm line 500. > Use of uninitialized value $path in pattern match (m//) at ../lib/File/Spec/VMS.pm line 39. > Use of uninitialized value in transliteration (tr///) at ../lib/File/Spec/VMS.pm line 46. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 47. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 48. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 49. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 50. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 51. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 52. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 59. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 69. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 70. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 71. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 72. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 73. > Use of uninitialized value $path in string eq at ../lib/File/Spec/VMS.pm line 74. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 74. > d0:[craig.perl.lib.module.build.t]install.........NOK 9 pm line 249. > > # Failed test in d0:[craig.perl.lib.module.build.t]install.t at line 233. > # Expected D0:[CRAIG.perl.t.install_test.SYS$DISK.foo.bar]Simple.pm to exist, but it doesn't > Use of uninitialized value in pattern match (m//) at /D0/CRAIG/PERL/lib/Module/Build/Base.pm line 2081. > Use of uninitialized value $current_mode in bitwise or (|) at /D0/CRAIG/PERL/lib/Module/Build/Base.pm line 1122. > Use of uninitialized value $fixedpath in substitution (s///) at ../lib/File/Spec/VMS.pm line 500. > Use of uninitialized value $path in pattern match (m//) at ../lib/File/Spec/VMS.pm line 39. > Use of uninitialized value in transliteration (tr///) at ../lib/File/Spec/VMS.pm line 46. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 47. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 48. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 49. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 50. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 51. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 52. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 59. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 69. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 70. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 71. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 72. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 73. > Use of uninitialized value $path in string eq at ../lib/File/Spec/VMS.pm line 74. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 74. > d0:[craig.perl.lib.module.build.t]install.........NOK 11 pm line 249. > > # Failed test in d0:[craig.perl.lib.module.build.t]install.t at line 233. > # Expected D0:[CRAIG.perl.t.install_test.SYS$DISK.foo.base.lib.perl5]Simple.pm to exist, but it doesn't > Use of uninitialized value in pattern match (m//) at /D0/CRAIG/PERL/lib/Module/Build/Base.pm line 2081. > Use of uninitialized value $current_mode in bitwise or (|) at /D0/CRAIG/PERL/lib/Module/Build/Base.pm line 1122. > Use of uninitialized value $fixedpath in substitution (s///) at ../lib/File/Spec/VMS.pm line 500. > Use of uninitialized value $path in pattern match (m//) at ../lib/File/Spec/VMS.pm line 39. > Use of uninitialized value in transliteration (tr///) at ../lib/File/Spec/VMS.pm line 46. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 47. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 48. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 49. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 50. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 51. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 52. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 59. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 69. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 70. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 71. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 72. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 73. > Use of uninitialized value $path in string eq at ../lib/File/Spec/VMS.pm line 74. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 74. > d0:[craig.perl.lib.module.build.t]install.........ok 20/34 pm line 249. > Can't find file [.lib]Simple.pm to determine version at /D0/CRAIG/PERL/lib > /Module/Build/Base.pm line 789. > d0:[craig.perl.lib.module.build.t]install.........ok 21/34 > Can't open perl script "build": no such file or directory > d0:[craig.perl.lib.module.build.t]install.........ok 22/34 > > # Failed test in d0:[craig.perl.lib.module.build.t]install.t at line 233. > d0:[craig.perl.lib.module.build.t]install.........NOK 23 oesn't > Can't open perl script "build": no such file or directory > d0:[craig.perl.lib.module.build.t]install.........NOK 25 > > # Failed test 'Look for file at D0:[CRAIG.perl.t.install_test.foo.lib]Simple.pm' > # in d0:[craig.perl.lib.module.build.t]install.t at line 170. > # got: undef > # expected: '1' > Can't find file [.lib]Simple.pm to determine version at /D0/CRAIG/PERL/lib/Module/Build/Base.pm line 789. > # Looks like you planned 34 tests but only ran 26. > # Looks like you failed 5 tests of 26 run. > d0:[craig.perl.lib.module.build.t]install.........dubious > Test returned status 44 (wstat 1024, 0x400) > (VMS status is 44) > DIED. FAILED tests 5, 9, 11, 23, 25, 27-34 > Failed 13/34 tests, 61.76% okay > d0:[craig.perl.lib.module.build.t]manifypods...... > Warning: Removing existing directory 'D0:[CRAIG.perl.t._tmp.Simple]' > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp2/t/tmp1: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/Dis > tGen.pm line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp2/t: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen. > pm line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp2: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm > line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp1: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm > line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm line > 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple/: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm line 3 > d0:[craig.perl.lib.module.build.t]manifypods......ok 1/21 > Use of uninitialized value in pattern match (m//) at /D0/CRAIG/PERL/lib/Mod > ule/Build/Base.pm line 2081. > d0:[craig.perl.lib.module.build.t]manifypods......NOK 6 e/Build/Base.pm line 2081. > > # Failed test 'Created [.blib.bindoc]Simple__AllPod.rno manpage' > d0:[craig.perl.lib.module.build.t]manifypods......NOK 9 > > # Failed test 'Created [.blib.bindoc]Simple.rno manpage' > d0:[craig.perl.lib.module.build.t]manifypods......NOK 11 > > # Failed test 'Created [.blib.bindoc]haspod.pl.rno manpage' > # in d0:[craig.perl.lib.module.build.t]manifypods.t at line 118. > Use of uninitialized value $fixedpath in substitution (s///) at ../lib/File/Spec/VMS.pm line 500. > Use of uninitialized value $path in pattern match (m//) at ../lib/File/Spec/VMS.pm line 39. > Use of uninitialized value in transliteration (tr///) at ../lib/File/Spec/VMS.pm line 46. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 47. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 48. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 49. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 50. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 51. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 52. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 59. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 69. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 70. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 71. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 72. > Use of uninitialized value $path in substitution (s///) at ../lib/File/Spec/VMS.pm line 73. > Use of uninitialized value $path in string eq at ../lib/File/Spec/VMS.pm line 74. > d0:[craig.perl.lib.module.build.t]manifypods......NOK 12 MS.pm line 74. > > # Failed test 'Created D0:[CRAIG.perl.t.install_test.man.man1]Simple__AllPod.rno manpage' > d0:[craig.perl.lib.module.build.t]manifypods......NOK 13 > > # Failed test 'Created D0:[CRAIG.perl.t.install_test.man.man1]Simple.rno manpage' > d0:[craig.perl.lib.module.build.t]manifypods......NOK 14 > > # Failed test 'Created D0:[CRAIG.perl.t.install_test.man.man1]haspod.pl.rno manpage' > # in d0:[craig.perl.lib.module.build.t]manifypods.t at line 127. > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp2/t/tmp1: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/Dis > tGen.pm line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp2/t: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen. > pm line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp2: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm > line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp1: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm > line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm line > 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple/: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm line 3 > 20 > Warning: Removing existing directory 'D0:[CRAIG.perl.t._tmp.Simple]' > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp2/t/tmp1: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/Dis > tGen.pm line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp2/t: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen. > pm line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp2: directory not empty at /D0/CRAIG/PERL/lib/Module/Build/t/lib/DistGen.pm > line 320 > Can't remove directory /D0/CRAIG/perl/t/_tmp/Simple//t/tmp1: direct... [truncated message content] |
|
From: John E. M. <wb...@qs...> - 2006-01-26 15:39:21
|
Yitzchak Scott-Thoennes wrote:
> Just a few comments to start with. Have you had a chance to look
> at any of this?
>
> On Sat, Jan 21, 2006 at 07:16:08PM -0600, Craig A. Berry wrote:
>
>>I tested it against blead@26919. Complete harness output is below.
>>It may not be as bad as it looks in that it appears a handful of
>>issues recur repeatedly. It will take me some time to understand
>>Module::Build well enough to debug these.
>>
>>$ perl harness [-.lib.Module.Build.t]*.t
>>d0:[craig.perl.lib.module.build.t]basic...........ok 7/55
>> Can't cd to D0:[CRAIG.perl.t._tmp.Simple]: no such file or directory
>
> Is there something wrong with that path name? The different case for
> D0 and CRAIG? The _ in _tmp? Most of the tests use lib/DistGen.pm to
> generate directories of test files and cd into them to run their
> tests. If that's not working, that's the first thing to try to fix.
Are you sure that the code is trying to create a directory named "_tmp"?
It might be trying to create a directory named ".tmp" which while the
VMS code in Perl should treat as "_tmp", there may still be some cases
where that does not work so well.
>># Looks like you planned 55 tests but only ran 13.
>>d0:[craig.perl.lib.module.build.t]basic...........dubious
>> Test returned status 44 (wstat 1024, 0x400)
>> (VMS status is 44)
>>DIED. FAILED tests 14-55
>> Failed 42/55 tests, 23.64% okay (less 1 skipped test: 12 okay, 21.82%)
>>d0:[craig.perl.lib.module.build.t]compat..........skipped
>> all skipped: Don't know how to invoke 'make'
> compat.t tests that the different flavors of compatibility
> Makefile.PLs work with the "perl Makefile.PL; make" approach.
> Does VMS have $Config{make} set to something suitable? If so,
> perhaps the find_in_path($Config{make}) check is making this
> whole test skipped when it shouldn't be?
I do not know if VMS has $Config{make} set.
>> Can't locate object method "eliminate_macros" via package
>>"Module::Build" at /D0/CRAIG/PERL/lib/Module/Build/Platform/VMS.pm line 85
>
> Hmm, looks like some code mistranslated from what makemaker did.
> And it looks like there's some kind of incestuous relationship
> between File::Spec and makemaker wrt eliminate_macros. Yuck.
Yep. Perl on VMS implemented environment variables differently than the
way that the MMS/MMS (Make type programs) can handle them, so such
macros can not be put in DESCRIP.MMS (a makefile equivalent) so
makemaker is compensating for it.
-John
wb...@qs...
Personal Opinion Only
|
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-01-26 15:58:42
|
On Thu, Jan 26, 2006 at 10:38:41AM -0500, John E. Malmberg wrote: > Yitzchak Scott-Thoennes wrote: > >Just a few comments to start with. Have you had a chance to look > >at any of this? > > > >On Sat, Jan 21, 2006 at 07:16:08PM -0600, Craig A. Berry wrote: > > > >>I tested it against blead@26919. Complete harness output is below. > >>It may not be as bad as it looks in that it appears a handful of > >>issues recur repeatedly. It will take me some time to understand > >>Module::Build well enough to debug these. > >> > >>$ perl harness [-.lib.Module.Build.t]*.t > >>d0:[craig.perl.lib.module.build.t]basic...........ok 7/55 > >> Can't cd to D0:[CRAIG.perl.t._tmp.Simple]: no such file or directory > > > >Is there something wrong with that path name? The different case for > >D0 and CRAIG? The _ in _tmp? Most of the tests use lib/DistGen.pm to > >generate directories of test files and cd into them to run their > >tests. If that's not working, that's the first thing to try to fix. > > Are you sure that the code is trying to create a directory named "_tmp"? > It might be trying to create a directory named ".tmp" which while the > VMS code in Perl should treat as "_tmp", there may still be some cases > where that does not work so well. No, it's really trying to create "_tmp". |
|
From: Craig A. B. <cra...@ma...> - 2006-01-26 17:46:25
|
At 1:46 AM -0800 1/26/06, Yitzchak Scott-Thoennes wrote:
>Just a few comments to start with. Have you had a chance to look
>at any of this?
Started to debug it but haven't gotten very far.
> >
> > $ perl harness [-.lib.Module.Build.t]*.t
>> d0:[craig.perl.lib.module.build.t]basic...........ok 7/55
>> Can't cd to D0:[CRAIG.perl.t._tmp.Simple]: no such file or directory
>
>Is there something wrong with that path name? The different case for
>D0 and CRAIG? The _ in _tmp? Most of the tests use lib/DistGen.pm to
>generate directories of test files and cd into them to run their
>tests. If that's not working, that's the first thing to try to fix.
The pathname is ok. The test can't find it because it really doesn't
exist because it got deleted by DistGen->clean(), which doesn't
recognize it as one of the directories in its cache of directory
names. The basic issues revolve around VMS filespec idiosyncracies.
For example, we'll have to call splitpath before splitdir if we want
the device name to be separated from the first directory name:
$ perl -e "use File::Spec; print join('|', File::Spec->splitdir('DEV:[foo.bar]'));"
DEV:[foo|bar
$ perl -e "use File::Spec; print join('|', File::Spec->splitpath('DEV:[foo.bar]'));"
DEV:|[foo.bar]|
> > # Looks like you planned 55 tests but only ran 13.
>> d0:[craig.perl.lib.module.build.t]basic...........dubious
>> Test returned status 44 (wstat 1024, 0x400)
>> (VMS status is 44)
>> DIED. FAILED tests 14-55
>> Failed 42/55 tests, 23.64% okay (less 1 skipped test: 12 okay, 21.82%)
>> d0:[craig.perl.lib.module.build.t]compat..........skipped
>> all skipped: Don't know how to invoke 'make'
>
>compat.t tests that the different flavors of compatibility
>Makefile.PLs work with the "perl Makefile.PL; make" approach.
>Does VMS have $Config{make} set to something suitable? If so,
>perhaps the find_in_path($Config{make}) check is making this
>whole test skipped when it shouldn't be?
We've got it in %Config:
$ perl -"V:make"
make='MMK';
I think the problem is likely in the find_in_path() call here:
if ( $Config{make} && find_in_path($Config{make}) ) {
plan tests => 30 + @makefile_types*$tests_per_type;
} else {
plan skip_all => "Don't know how to invoke 'make'";
}
On VMS, searching the path is the least common mechanism for locating
the program that will execute a command. I think instead of
find_in_path() we'll have to abstract this into a make_is_installed()
or something that can do different things when necessary.
> > Can't locate object method "eliminate_macros" via package "Module::Build" at /D0/CRAIG/PERL/lib/Module/Build/Platform/VMS.pm line 85
>
>Hmm, looks like some code mistranslated from what makemaker did.
>And it looks like there's some kind of incestuous relationship
>between File::Spec and makemaker wrt eliminate_macros. Yuck.
IIRC, MM has its own copy in order to run on older Perls that don't
have it in File::Spec. We either need to duplicate the incest in MB
or figure out whether the minimum Perl version that has it in
File::Spec is an acceptable prerequisite for the use of MB on VMS.
--
________________________________________
Craig A. Berry
mailto:cra...@ma...
"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser
|
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-01-26 19:06:57
|
On Thu, Jan 26, 2006 at 11:45:12AM -0600, Craig A. Berry wrote:
> At 1:46 AM -0800 1/26/06, Yitzchak Scott-Thoennes wrote:
> >Just a few comments to start with. Have you had a chance to look
> >at any of this?
>
> Started to debug it but haven't gotten very far.
>
> > >
> > > $ perl harness [-.lib.Module.Build.t]*.t
> >> d0:[craig.perl.lib.module.build.t]basic...........ok 7/55
> >> Can't cd to D0:[CRAIG.perl.t._tmp.Simple]: no such file or directory
> >
> >Is there something wrong with that path name? The different case for
> >D0 and CRAIG? The _ in _tmp? Most of the tests use lib/DistGen.pm to
> >generate directories of test files and cd into them to run their
> >tests. If that's not working, that's the first thing to try to fix.
>
> The pathname is ok. The test can't find it because it really doesn't
> exist because it got deleted by DistGen->clean(), which doesn't
> recognize it as one of the directories in its cache of directory
> names. The basic issues revolve around VMS filespec idiosyncracies.
> For example, we'll have to call splitpath before splitdir if we want
> the device name to be separated from the first directory name:
>
> $ perl -e "use File::Spec; print join('|', File::Spec->splitdir('DEV:[foo.bar]'));"
> DEV:[foo|bar
> $ perl -e "use File::Spec; print join('|', File::Spec->splitpath('DEV:[foo.bar]'));"
> DEV:|[foo.bar]|
>
>
> > > # Looks like you planned 55 tests but only ran 13.
> >> d0:[craig.perl.lib.module.build.t]basic...........dubious
> >> Test returned status 44 (wstat 1024, 0x400)
> >> (VMS status is 44)
> >> DIED. FAILED tests 14-55
> >> Failed 42/55 tests, 23.64% okay (less 1 skipped test: 12 okay, 21.82%)
> >> d0:[craig.perl.lib.module.build.t]compat..........skipped
> >> all skipped: Don't know how to invoke 'make'
> >
> >compat.t tests that the different flavors of compatibility
> >Makefile.PLs work with the "perl Makefile.PL; make" approach.
> >Does VMS have $Config{make} set to something suitable? If so,
> >perhaps the find_in_path($Config{make}) check is making this
> >whole test skipped when it shouldn't be?
>
> We've got it in %Config:
>
> $ perl -"V:make"
> make='MMK';
>
> I think the problem is likely in the find_in_path() call here:
>
> if ( $Config{make} && find_in_path($Config{make}) ) {
> plan tests => 30 + @makefile_types*$tests_per_type;
> } else {
> plan skip_all => "Don't know how to invoke 'make'";
> }
>
> On VMS, searching the path is the least common mechanism for locating
> the program that will execute a command. I think instead of
> find_in_path() we'll have to abstract this into a make_is_installed()
> or something that can do different things when necessary.
>
> > > Can't locate object method "eliminate_macros" via package "Module::Build" at /D0/CRAIG/PERL/lib/Module/Build/Platform/VMS.pm line 85
> >
> >Hmm, looks like some code mistranslated from what makemaker did.
> >And it looks like there's some kind of incestuous relationship
> >between File::Spec and makemaker wrt eliminate_macros. Yuck.
>
> IIRC, MM has its own copy in order to run on older Perls that don't
> have it in File::Spec. We either need to duplicate the incest in MB
> or figure out whether the minimum Perl version that has it in
> File::Spec is an acceptable prerequisite for the use of MB on VMS.
It looked to me to involve more than just the eliminate_macros
function itself; it looks as if it calls $self-> methods that
aren't actually in File::Spec, expecting to be working with a
MM subclass of File::Spec? I didn't look at it all that long,
though.
|
|
From: Ken W. <ke...@ma...> - 2006-01-26 23:27:41
|
On Jan 26, 2006, at 11:45 AM, Craig A. Berry wrote:
> The pathname is ok. The test can't find it because it really doesn't
> exist because it got deleted by DistGen->clean(), which doesn't
> recognize it as one of the directories in its cache of directory
> names. The basic issues revolve around VMS filespec idiosyncracies.
> For example, we'll have to call splitpath before splitdir if we want
> the device name to be separated from the first directory name:
>
> $ perl -e "use File::Spec; print join('|',
> File::Spec->splitdir('DEV:[foo.bar]'));"
> DEV:[foo|bar
> $ perl -e "use File::Spec; print join('|',
> File::Spec->splitpath('DEV:[foo.bar]'));"
> DEV:|[foo.bar]|
Yup, thanks for spotting that. Other platforms with volume names can
presumably be affected by this too.
> On VMS, searching the path is the least common mechanism for locating
> the program that will execute a command. I think instead of
> find_in_path() we'll have to abstract this into a make_is_installed()
> or something that can do different things when necessary.
That would be great.
-Ken
|
|
From: Ken W. <ke...@ma...> - 2006-01-26 23:35:24
|
On Jan 26, 2006, at 11:45 AM, Craig A. Berry wrote:
> The pathname is ok. The test can't find it because it really doesn't
> exist because it got deleted by DistGen->clean(), which doesn't
> recognize it as one of the directories in its cache of directory
> names. The basic issues revolve around VMS filespec idiosyncracies.
> For example, we'll have to call splitpath before splitdir if we want
> the device name to be separated from the first directory name:
>
> $ perl -e "use File::Spec; print join('|',
> File::Spec->splitdir('DEV:[foo.bar]'));"
> DEV:[foo|bar
> $ perl -e "use File::Spec; print join('|',
> File::Spec->splitpath('DEV:[foo.bar]'));"
> DEV:|[foo.bar]|
How's the following patch look for this issue?
Index: t/lib/DistGen.pm
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/lib/DistGen.pm,v
retrieving revision 1.15
diff -u -r1.15 DistGen.pm
--- t/lib/DistGen.pm 4 Dec 2005 08:48:09 -0000 1.15
+++ t/lib/DistGen.pm 26 Jan 2006 23:34:39 -0000
@@ -282,33 +282,26 @@
my %names;
foreach my $file ( keys %{$self->{filedata}} ) {
my $filename = $self->_real_filename( $file );
- my $dirname = File::Basename::dirname( $filename );
+ my ($vol, $dirname, $f) = File::Spec->splitpath( $filename );
+ $dirname = File::Spec->curdir unless length $dirname; # Old F::S
bug
+ $dirname = File::Spec->canonpath($dirname);
- $names{files}{$filename} = 0;
+ $names{$filename} = 0;
my @dirs = File::Spec->splitdir( $dirname );
while ( @dirs ) {
my $dir = File::Spec->catdir( @dirs );
- $names{dirs}{$dir} = 0;
+ $names{$dir} = 0;
pop( @dirs );
}
}
File::Find::finddepth( sub {
- my $dir = File::Spec->canonpath( $File::Find::dir );
my $name = File::Spec->canonpath( $File::Find::name );
- if ( -d && not exists $names{dirs}{$name} ) {
- print "Removing directory '$name'\n" if $VERBOSE;
+ if ( not exists $names{$name} ) {
+ print "Removing '$name'\n" if $VERBOSE;
File::Path::rmtree( $_ );
- return;
- } elsif ( -d ) {
- return;
- } elsif ( exists $names{files}{$name} ) {
- #print "Leaving file '$name'\n" if $VERBOSE;
- } else {
- print "Unlinking file '$name'\n" if $VERBOSE;
- 1 while unlink( $_ );
}
}, File::Spec->curdir );
|
|
From: Craig A. B. <cra...@ma...> - 2006-01-27 01:50:45
|
At 5:35 PM -0600 1/26/06, Ken Williams wrote:
>On Jan 26, 2006, at 11:45 AM, Craig A. Berry wrote:
>>The pathname is ok. The test can't find it because it really doesn't
>>exist because it got deleted by DistGen->clean(), which doesn't
>>recognize it as one of the directories in its cache of directory
>>names. The basic issues revolve around VMS filespec idiosyncracies.
>>For example, we'll have to call splitpath before splitdir if we want
>>the device name to be separated from the first directory name:
>>
>>$ perl -e "use File::Spec; print join('|', File::Spec->splitdir('DEV:[foo.bar]'));"
>>DEV:[foo|bar
>>$ perl -e "use File::Spec; print join('|', File::Spec->splitpath('DEV:[foo.bar]'));"
>>DEV:|[foo.bar]|
>
>
>How's the following patch look for this issue?
>
>Index: t/lib/DistGen.pm
>===================================================================
>RCS file: /cvsroot/module-build/Module-Build/t/lib/DistGen.pm,v
>retrieving revision 1.15
>diff -u -r1.15 DistGen.pm
>--- t/lib/DistGen.pm 4 Dec 2005 08:48:09 -0000 1.15
>+++ t/lib/DistGen.pm 26 Jan 2006 23:34:39 -0000
After applying that and turning on verbosity, I'm seeing:
$ perl [-.lib.module.build.t]tilde.t
1..11
Changed file 't/basic.t'.
Changed file 'lib/Simple.pm'.
Changed file 'Build.PL'.
Removing '[]/build.pl'
Removing '[]/manifest.'
Removing '[]/lib/simple.pm'
Removing '[]/lib'
Removing '[]/t/basic.t'
Removing '[]/t'
Removing '[]/[]'
Can't cd to D0:[CRAIG.perl.t._tmp.Simple]: no such file or directory
# No tests run!
We're tripping over the particular sequence in which filenames (or
their component parts) are converted to and from native syntax inside
of File::Find. After applying the following (which would have to be
made VMS-specific and may not be the best solution anyway):
--- distgen.pm;-1 Thu Jan 26 18:51:59 2006
+++ distgen.pm Thu Jan 26 18:59:40 2006
@@ -303,7 +303,7 @@ sub clean {
print "Removing '$name'\n" if $VERBOSE;
File::Path::rmtree( $_ );
}
- }, File::Spec->curdir );
+ }, './' );
chdir( $here );
}
[end]
I then get
$ perl [-.lib.module.build.t]tilde.t
1..11
Changed file 't/basic.t'.
Changed file 'lib/Simple.pm'.
Changed file 'Build.PL'.
Removing 'build.pl'
Removing 'manifest.'
Removing '[.lib]simple.pm'
Removing 'lib'
Removing 't'
Removing '[]'
Can't cd to D0:[CRAIG.perl.t._tmp.Simple]: no such file or directory
# No tests run!
So now we're getting to the problem that was Yitzchak's first theory,
namely that it's a case problem, more specifically, the case-leveled
names returned from File::Find do not match the case-preserved names
in the hash, so we delete the files because they are not recognized.
One way to deal with this would be to acquire or build a
case-tolerant tied hash and use one of those instead of an ordinary
hash. Basically when you look up a case-preserved name in the hash
and it doesn't match, it will then look up a case-leveled version for
you. Schwern suggested this solution a long time ago for
ExtUtils::Manifest::manifind() and it's still needed there, so
perhaps we could put such a package in a place where both MM and MB
can use it. I think there are a couple of implementations on CPAN .
--
________________________________________
Craig A. Berry
mailto:cra...@ma...
"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser
|
|
From: John E. M. <wb...@qs...> - 2006-01-27 02:32:24
|
Craig A. Berry wrote: > > So now we're getting to the problem that was Yitzchak's first theory, > namely that it's a case problem, more specifically, the case-leveled > names returned from File::Find do not match the case-preserved names > in the hash, so we delete the files because they are not recognized. > One way to deal with this would be to acquire or build a > case-tolerant tied hash and use one of those instead of an ordinary > hash. Basically when you look up a case-preserved name in the hash > and it doesn't match, it will then look up a case-leveled version for > you. Schwern suggested this solution a long time ago for > ExtUtils::Manifest::manifind() and it's still needed there, so > perhaps we could put such a package in a place where both MM and MB > can use it. I think there are a couple of implementations on CPAN . Try $DEFINE DECC$EFS_CASE_PRESERVE ENABLE And blead will preserve the case of files on ODS-5 volumes. On ODS-2 volumes they will be uppercased. Note some of the lib and external modules may still be assuming that VMS means all lowercase filenames because this feature is still not implemented fully. -John wb...@qs... Personal Opinion Only |
|
From: Craig A. B. <cra...@ma...> - 2006-01-27 04:42:18
|
At 9:31 PM -0500 1/26/06, John E. Malmberg wrote:
>Craig A. Berry wrote:
>>
>>So now we're getting to the problem that was Yitzchak's first theory,
>>namely that it's a case problem, more specifically, the case-leveled
>>names returned from File::Find do not match the case-preserved names
>>in the hash, so we delete the files because they are not recognized.
>>One way to deal with this would be to acquire or build a
>>case-tolerant tied hash and use one of those instead of an ordinary
>>hash. Basically when you look up a case-preserved name in the hash
>>and it doesn't match, it will then look up a case-leveled version for
>>you. Schwern suggested this solution a long time ago for
>>ExtUtils::Manifest::manifind() and it's still needed there, so
>>perhaps we could put such a package in a place where both MM and MB
>>can use it. I think there are a couple of implementations on CPAN .
>
>Try
>
>$DEFINE DECC$EFS_CASE_PRESERVE ENABLE
>
>And blead will preserve the case of files on ODS-5 volumes.
Assuming previous activities, such as unpacking the source archive or
applying patches to it, have not already leveled the case. This
could be a way to set aside the case issue and see what else comes
up, but the case issue still needs to be solved.
>On ODS-2 volumes they will be uppercased.
Which is a bit of a problem because it's the exact opposite of what
the default behavior was when ODS-2 was the only filesystem the C
run-time knew about.
>
>Note some of the lib and external modules may still be assuming that VMS means all lowercase filenames because this feature is still not implemented fully.
Right. And what I'm proposing is a way to start getting some of the
key infrastructure ready to handle it.
--
________________________________________
Craig A. Berry
mailto:cra...@ma...
"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser
|
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-02-05 23:39:45
|
On Thu, Jan 26, 2006 at 10:41:55PM -0600, Craig A. Berry wrote: > At 9:31 PM -0500 1/26/06, John E. Malmberg wrote: > >Craig A. Berry wrote: > >> > >>So now we're getting to the problem that was Yitzchak's first theory, > >>namely that it's a case problem, more specifically, the case-leveled > >>names returned from File::Find do not match the case-preserved names > >>in the hash, so we delete the files because they are not recognized. > >>One way to deal with this would be to acquire or build a > >>case-tolerant tied hash and use one of those instead of an ordinary > >>hash. Basically when you look up a case-preserved name in the hash > >>and it doesn't match, it will then look up a case-leveled version for > >>you. Schwern suggested this solution a long time ago for > >>ExtUtils::Manifest::manifind() and it's still needed there, so > >>perhaps we could put such a package in a place where both MM and MB > >>can use it. I think there are a couple of implementations on CPAN . 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. |
|
From: Craig A. B. <cra...@ma...> - 2006-02-06 00:11:18
|
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} ) { print "Removing '$name'\n" if $VERBOSE; File::Path::rmtree( $_ ); } - }, File::Spec->curdir ); + }, './' ); chdir( $here ); } -- ________________________________________ Craig A. Berry mailto:cra...@ma... "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser |
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-02-06 04:18:38
|
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. > --- DistGen.pm;2 Thu Jan 26 18:48:29 2006 > +++ DistGen.pm Sun Jan 29 15:58:55 2006 > +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'; Ken, do you have any problem with bundling Tie::CPHash in Module::Build under t/bundled? The .pm file is just 5k. Alternatively, it could be a build prerequisite, but I'm guessing you'd rather not do that. Rafael, what do you think about adding it to the core along with Module-Build? If the Module::Build tests need it, it would need to be included in the perl source, but wouldn't necessarily have to get installed. But if Craig or someone else ends up modifying ExtUtils::Manifest::manifind to rely on it at some point in the not too distant future, it might make sense just to add it already. A short review: the module looks pretty clean and simple; it does one thing and does it with no frills. It could stand to have a SCALAR method added, but other than that the 8 year old code looks great. |
|
From: Ken W. <ke...@ma...> - 2006-02-07 03:32:13
|
On Feb 5, 2006, at 10:18 PM, Yitzchak Scott-Thoennes wrote: > Ken, do you have any problem with bundling Tie::CPHash in > Module::Build under t/bundled? The .pm file is just 5k. > Alternatively, it could be a build prerequisite, but I'm guessing > you'd rather not do that. Sure, bundling in t/bundled would be just fine with me. The bigger question is whether it goes in core, of course. -Ken |
|
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-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: Yitzchak Scott-T. <sth...@ef...> - 2006-02-24 17:17:30
|
On Sun, Feb 19, 2006 at 10:10:07PM -0800, Yitzchak Scott-Thoennes wrote: > 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.) Ping? |
|
From: Ken W. <ke...@ma...> - 2006-02-24 23:12:30
|
On Feb 24, 2006, at 11:17 AM, Yitzchak Scott-Thoennes wrote: > On Sun, Feb 19, 2006 at 10:10:07PM -0800, Yitzchak Scott-Thoennes > wrote: >> 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.) > > Ping? Hi Yitzchak, I just got my laptop recovered this morning from a hard-drive crash over the weekend. That's why I've been completely out of touch - bad timing! To help my memory get back up to speed: is Tie::CPHash required just for testing, or also in runtime? Stuff in t/bundled/ is only used during building and testing, not installed during the 'install' action. -Ken |
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-02-24 23:43:25
|
On Fri, Feb 24, 2006 at 05:04:37PM -0600, Ken Williams wrote: > > On Feb 24, 2006, at 11:17 AM, Yitzchak Scott-Thoennes wrote: > > >On Sun, Feb 19, 2006 at 10:10:07PM -0800, Yitzchak Scott-Thoennes > >wrote: > >>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.) > > > >Ping? > > > Hi Yitzchak, > > I just got my laptop recovered this morning from a hard-drive crash > over the weekend. That's why I've been completely out of touch - bad > timing! > > To help my memory get back up to speed: is Tie::CPHash required just > for testing, or also in runtime? Stuff in t/bundled/ is only used > during building and testing, not installed during the 'install' action. Just testing, and apparently really just for VMS, but I think it's be better to have all tests go through the same code, so have all platforms use it. |
|
From: Ken W. <ke...@ma...> - 2006-02-25 15:37:32
|
On Feb 24, 2006, at 5:43 PM, Yitzchak Scott-Thoennes wrote: > Just testing, and apparently really just for VMS, but I think it's > be better to have all tests go through the same code, so have all > platforms use it. Okay, thanks, applied. Did we ever figure out why the hard-coding was needed for that last line? Is it File::Find being too Unix-centric? -Ken |
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-03-03 14:13:12
|
On Sat, Feb 25, 2006 at 09:37:13AM -0600, Ken Williams wrote: > > On Feb 24, 2006, at 5:43 PM, Yitzchak Scott-Thoennes wrote: > >Just testing, and apparently really just for VMS, but I think it's > >be better to have all tests go through the same code, so have all > >platforms use it. > > Okay, thanks, applied. Did we ever figure out why the hard-coding > was needed for that last line? No. I think curdir would have been something like "[]". > Is it File::Find being too Unix-centric? Don't know. |