PERL PERL5 PORTERS 15 PATCH FIND2PERL NEW OPTIONS
Subject: [PATCH] find2perl, new options
Date: Thu, 17 Feb 2005 22:30:13 +0100

From: slaven@no-spam

The patch below adds processing of the -path, -ipath and -iname options to find2perl (including with Pod change). Also, in the x2p Makefile some dependencies was missing and will be added by the patch.

The patch is against bleedperl.

Enjoy,
Slaven
# # # 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.
# STEP 2: Run the 'patch' program with this file as input.
#
#### End of Preamble ####

#### Patch data follows ####
diff -up 'perl-5.9.x/x2p/Makefile.SH' 'new.perl-5.9.x/x2p/Makefile.SH'
Index: ./x2p/Makefile.SH --- ./x2p/Makefile.SH Wed May 28 15:43:43 2003
+++ ./x2p/Makefile.SH Wed Feb 16 19:24:29 2005
@@no-spam -176,6 +176,10 @@no-spam shlist:
$(plextract):
../miniperl -I../lib $@no-spam +find2perl: find2perl.PL +
+s2p: s2p.PL +
malloc.c: ../malloc.c rm -f malloc.c sed <../malloc.c >malloc.c \
diff -up 'perl-5.9.x/x2p/find2perl.PL' 'new.perl-5.9.x/x2p/find2perl.PL'
Index: ./x2p/find2perl.PL --- ./x2p/find2perl.PL Wed Apr 28 20:52:58 2004
+++ ./x2p/find2perl.PL Wed Feb 16 19:26:59 2005
@@no-spam -99,8 +99,10 @@no-spam while (@no-spam {
} elsif ($_ eq '!') {
$out .= tab . "!";
next;
- } elsif ($_ eq 'name') {
- $out .= tab . '/' . fileglob_to_re(shift) . "/s";
+ } elsif ($_ =~ /^(i)?name$/) {
+ $out .= tab . '/' . fileglob_to_re(shift) . "/s$1";
+ } elsif ($_ =~ /^(i)?path$/) {
+ $out .= tab . '$File::Find::name =~ /' . fileglob_to_re(shift) . "/s$1";

} elsif ($_ eq 'perm') {
my $onum = shift;
$onum =~ /^-?[0-7]+$/
@@no-spam -783,6 +785,18 @@no-spam File name matches specified GLOB wildcar quoted to avoid interpretation by the shell (just as with using C<find(1)>).
+=item C<-iname GLOB>
+
+Like C<-name>, but the match is case insensitive.
+
+=item C<-path GLOB>
+
+Path name matches specified GLOB wildcard pattern.
+
+=item C<-ipath GLOB>
+
+Like C<-path>, but the match is case insensitive.
+
=item C<-perm PERM>
Low-order 9 bits of permission match octal value PERM.
#### End of Patch data ####

#### ApplyPatch data follows ####
# Data version : 1.0
# Date generated : Thu Feb 17 22:30:05 2005
# Generated by : makepatch 2.00_11*
# 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 # v 'patchlevel.h' 4656 1079599926 33060
# p 'x2p/Makefile.SH' 4653 1108578269 0100555
# p 'x2p/find2perl.PL' 24988 1108578419 0100555
#### End of ApplyPatch data ####

#### End of Patch kit [created: Thu Feb 17 22:30:05 2005] ####
#### Patch checksum: 87 2869 54837 ####
#### Checksum: 105 3493 40852 ####

-- __o Slaven Rezic _`\<,_ slaven <at> rezic <dot> de __(_)/ (_)____
______________________________________________________________________________