Since nobody answered to my previous suggestion, I just implemented it.
The diffs for ScanDeps.pm and PAR/Filter/PatchContent.pm are attached.
They are also available from the subversion repository. I will release a
new version of Module::ScanDeps now. A PAR release has to wait until
either more fixes have accumulated or I have (much) more time.
Testers welcome.
Steffen
=== lib/Module/ScanDeps.pm
==================================================================
--- lib/Module/ScanDeps.pm (revision 140)
+++ lib/Module/ScanDeps.pm (local)
@@ -4,7 +4,7 @@
use strict;
use vars qw( $VERSION @EXPORT @EXPORT_OK $CurrentPackage );
-$VERSION = '0.61';
+$VERSION = '0.62';
@EXPORT = qw( scan_deps scan_deps_runtime );
@EXPORT_OK = qw( scan_line scan_chunk add_deps scan_deps_runtime );
@@ -323,9 +323,35 @@
_glob_in_inc('XMLRPC/Transport', 1),;
},
'diagnostics.pm' => sub {
- _find_in_inc('Pod/perldiag.pod')
- ? 'Pod/perldiag.pl'
- : 'pod/perldiag.pod';
+ # shamelessly taken and adapted from diagnostics.pm
+ use Config;
+ my($privlib, $archlib) = @Config{qw(privlibexp archlibexp)};
+ if ($^O eq 'VMS') {
+ require VMS::Filespec;
+ $privlib = VMS::Filespec::unixify($privlib);
+ $archlib = VMS::Filespec::unixify($archlib);
+ }
+
+ for (
+ "pod/perldiag.pod",
+ "Pod/perldiag.pod",
+ "pod/perldiag-$Config{version}.pod",
+ "Pod/perldiag-$Config{version}.pod",
+ "pods/perldiag.pod",
+ "pods/perldiag-$Config{version}.pod",
+ ) {
+ return $_ if _find_in_inc($_);
+ }
+
+ for (
+ "$archlib/pods/perldiag.pod",
+ "$privlib/pods/perldiag-$Config{version}.pod",
+ "$privlib/pods/perldiag.pod",
+ ) {
+ return $_ if -f $_;
+ }
+
+ return 'pod/perldiag.pod';
},
'utf8.pm' => [
'utf8_heavy.pl', do {
--- /home/tsee/.cpan/build/PAR-0.941/lib/PAR/Filter/PatchContent.pm
2006-06-20 22:42:05.000000000 +0200
+++ lib/PAR/Filter/PatchContent.pm 2006-07-16 10:49:48.000000000 +0200
@@ -81,11 +81,19 @@
'if (eof(POD_DIAG)) ' => 'if (0 and eof(POD_DIAG)) ',
'close POD_DIAG' => '# close POD_DIAG',
'while (<POD_DIAG>) ' =>
- 'require PAR;
- for(map "$_\\n\\n", split/\\r?\\n(?:\\r?\\n)*/,
- PAR::read_file("lib/Pod/perldiag.pod") ||
- PAR::read_file("lib/pod/perldiag.pod")
- ) ',
+ 'require PAR; use Config;
+ my @files = (
+ "lib/pod/perldiag.pod",
+ "lib/pod/perldiag-$Config{version}.pod",
+ "lib/pods/perldiag.pod",
+ "lib/pods/perldiag-$Config{version}.pod",
+ );
+ my $contents;
+ foreach my $file (@files) {
+ $contents = PAR::read_file($file);
+ last if defined $contents;
+ }
+ for(map "$_\\n\\n", split/\\r?\\n(?:\\r?\\n)*/, $contents) ',
],
'utf8_heavy.pl' => [
'$list ||= eval { $caller->$type(); }'