[NI-S - Thu Jan 20 03:37:13 2005] wrote:
Show quoted text> If you are on UNIX or cygwin or similar can you do
> diff -rub .../mydistribution .../yourhackedversion > patch
> and send / post the resulting patch?
As TIMA (that's _not_ me) wrote, the suggested repair involves
removal / creation of files. I prepared a patch using JV's
'makepatch' tool (probably overkill for this, but ..).
As I write I am testing the patched distribution on cygwin and
on OpenBSD (later, GNU/Linux too), but the prerequisite modules
missing for me are slowling that down and my time is running
short. I believe that the patch will work, though; it applies
cleanly at least. Whether other issues will be encountered is
another matter.
Hope this helps.
# This is a patch for PodToHTML-0.05 to update it to PodToHTML_NIS_fixed
#
# To apply this patch:
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'applypatch' program with this patch file as input.
#
# If you do not have 'applypatch', it is part of the 'makepatch' package
# that you can fetch from the Comprehensive Perl Archive Network:
#
http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
# In the above URL, 'x' should be 2 or higher.
#
# To apply this patch without the use of 'applypatch':
# STEP 1: Chdir to the source directory.
# If you have a decent Bourne-type shell:
# STEP 2: Run the shell with this file as input.
# If you don't have such a shell, you may need to manually create/delete
# the files as shown below.
# STEP 3: Run the 'patch' program with this file as input.
#
# These are the commands needed to create/delete files/directories:
#
rm -f 'Pod/Find.pm'
touch 'Pod/Finder.pm'
chmod 0555 'Pod/Finder.pm'
#
# This command terminates the shell and need not be executed manually.
exit
#
#### End of Preamble ####
#### Patch data follows ####
diff -c 'PodToHTML-0.05/MANIFEST' 'PodToHTML_NIS_fixed/MANIFEST'
Index: ./MANIFEST
*** ./MANIFEST Sun Jun 20 17:20:51 2004
--- ./MANIFEST Fri Jun 24 05:19:43 2005
***************
*** 1,7 ****
MANIFEST
MANIFEST.SKIP
Makefile.PL
! Pod/Find.pm
Pod/HTML_Elements.pm
Pod/Links.pm
README
--- 1,7 ----
MANIFEST
MANIFEST.SKIP
Makefile.PL
! Pod/Finder.pm
Pod/HTML_Elements.pm
Pod/Links.pm
README
diff -c /dev/null 'PodToHTML_NIS_fixed/Pod/Finder.pm'
Index: ./Pod/Finder.pm
*** ./Pod/Finder.pm Wed Dec 31 19:00:00 1969
--- ./Pod/Finder.pm Fri Jun 24 05:20:29 2005
***************
*** 0 ****
--- 1,72 ----
+ package Pod::Finder;
+ use Exporter;
+ use File::Find;
+
+ @ISA = qw(Exporter);
+ @EXPORT = qw(find_pods contains_pod);
+
+ use strict;
+ use vars qw(%seen_file @pod_files);
+
+ sub find_pods
+ {
+ local %seen_file;
+ local @pod_files;
+ find( \&pod_finder, @_);
+ return @pod_files;
+ }
+
+ sub pod_finder
+ {
+ unless ($seen_file{$File::Find::name})
+ {
+ my $is_pod = 0;
+ if (/\.(?:pm|pod|pl)$/i || (-f $_ && -x _ && -T _))
+ {
+ $is_pod = contains_pod($_)
+ }
+
+ push(@pod_files,$File::Find::name) if ($seen_file{$File::Find::
name} = $is_pod);
+
+ if (-d $_)
+ {
+ if (/^(\d+\.[\d_]+)$/)
+ {
+ unless (eval "$1" == $])
+ {
+ $File::Find::prune = 1;
+ warn "perl$] skipping $File::Find::name/...\n";
+ return;
+ }
+ }
+ }
+ }
+ }
+
+ sub contains_pod
+ {
+ my $file = shift;
+ local $/ = '';
+ my $pod = 0;
+ if (open(POD,"<$file"))
+ {
+ local $_;
+ while (<POD>)
+ {
+ if ($pod = /^=head\d\s/)
+ {
+ last;
+ }
+ }
+ close(POD);
+ }
+ else
+ {
+ warn "Cannot open $file:$!\n";
+ }
+ return $pod;
+ }
+
+
+ 1;
+ __END__
diff -c 'PodToHTML-0.05/findpods' 'PodToHTML_NIS_fixed/findpods'
Index: ./findpods
*** ./findpods Sun Jun 20 17:20:51 2004
--- ./findpods Fri Jun 24 05:22:01 2005
***************
*** 3,9 ****
use Config;
use Carp;
use Pod::Links;
! use Pod::Find;
$SIG{'INT'} = \&Carp::confess;
--- 3,9 ----
use Config;
use Carp;
use Pod::Links;
! use Pod::Finder;
$SIG{'INT'} = \&Carp::confess;
diff -c 'PodToHTML-0.05/podtohtml' 'PodToHTML_NIS_fixed/podtohtml'
Index: ./podtohtml
*** ./podtohtml Sun Jun 20 17:20:51 2004
--- ./podtohtml Fri Jun 24 05:21:37 2005
***************
*** 1,7 ****
#!/usr/local/bin/new/perl -w
use 5.004;
use strict;
! use Pod::Find;
use Pod::Links;
use Pod::Usage;
use Pod::HTML_Elements;
--- 1,7 ----
#!/usr/local/bin/new/perl -w
use 5.004;
use strict;
! use Pod::Finder;
use Pod::Links;
use Pod::Usage;
use Pod::HTML_Elements;
***************
*** 180,187 ****
=item -I
! Search perl's C<@INC> for pods. Heuristics implemented in L<Pod::Find>
! attempt to restrict search to files related to the version of perl
executing the script.
=item -S
--- 180,187 ----
=item -I
! Search perl's C<@INC> for pods. Heuristics implemented in L<Pod::
Show quoted textFinder>
! attempt to restrict search only to files related to the version of
perl
executing the script.
=item -S
#### End of Patch data ####
#### ApplyPatch data follows ####
# Data version : 1.0
# Date generated : Sun Jun 26 02:57:48 2005
# Generated by : makepatch 2.00_12*
# Recurse directories : Yes
# Excluded files : (\A|/).*\~\Z
# (\A|/).*\.a\Z
# (\A|/).*\.bak\Z
# (\A|/).*\.BAK\Z
# (\A|/).*\.elc\Z
# (\A|/).*\.exe\Z
# (\A|/).*\.gz\Z
# (\A|/).*\.ln\Z
# (\A|/).*\.o\Z
# (\A|/).*\.obj\Z
# (\A|/).*\.olb\Z
# (\A|/).*\.old\Z
# (\A|/).*\.orig\Z
# (\A|/).*\.rej\Z
# (\A|/).*\.so\Z
# (\A|/).*\.Z\Z
# (\A|/)\.del\-.*\Z
# (\A|/)\.make\.state\Z
# (\A|/)\.nse_depinfo\Z
# (\A|/)core\Z
# (\A|/)tags\Z
# (\A|/)TAGS\Z
# r 'Pod/Find.pm' 1225 0
# p 'MANIFEST' 161 1119604783 0100500
# c 'Pod/Finder.pm' 0 1119604829 0100555
# p 'findpods' 1001 1119604921 0100555
# p 'podtohtml' 4948 1119604897 0100555
#### End of ApplyPatch data ####
#### End of Patch kit [created: Sun Jun 26 02:57:48 2005] ####
#### Patch checksum: 199 4723 44232 ####
#### Checksum: 230 5829 6160 ####
--
Also email <perlspinr=XfrvlLN1Pqtfpb/ySbbPhw@public.gmane.org>.