Skip Menu |

This queue is for tickets about the File-FnMatch CPAN distribution.

Report information
The Basics
Id: 12005
Status: resolved
Priority: 0/
Queue: File-FnMatch

People
Owner: mjp [...] cpan.org
Requestors: blair [...] orcaware.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.01
Fixed in: (no value)



Subject: Cannot build File::FnMatch on perls older than 5.6.1
Hello, I'm working on upgrading my Apache::ConfigParser module in CPAN to use your module to find Apache configuration files that are specified by an fnmatch regex.. Apache::ConfigParser supports Perl 5.005_03 and 5.005_04, but these versions cannot build File::FnMatch. I was able to get it going with the following steps. 1) cd into File-FnMatch-0.01. 2) Generate a newer ppport.h using the latest version of Perl you can find and the latest version of Devel::PPPort. On my system, I have a self compiled version of 5.8.6 with the latest Devel::PPPort installed from CPAN. $ /opt/i386-linux/installed/perl-5.8.6/bin/perl -MDevel::PPPort \ -e 'Devel::PPPort::WriteFile()' This replaces ppport.h with a newer version. 3) Then run perl ppport.h and follow it's advice. $ perl ppport.h Scanning ./FnMatch.xs ... === Analyzing ./FnMatch.xs === Uses SvPV_nolen, which depends on sv_2pv_nolen Uses gv_stashpvn Show quoted text
--- hint for gv_stashpvn --- This function's backport doesn't support the length parameter, but rather ignores it. Portability can only be ensured if the length parameter is used for speed reasons, but the length can always be correctly computed from the string argument. Uses newCONSTSUB --- hint for newCONSTSUB --- Returns a CV* as of perl-5.7.1. This return value is not supported by Devel::PPPort. File needs newCONSTSUB, adding static request File needs sv_2pv_nolen, adding static request Suggested changes: --- ./FnMatch.xs 2005-03-25 14:18:23.204706019 -0800 +++ ./FnMatch.xs.patched 2005-03-25 14:18:26.613067270 -0800 @@ -2,6 +2,8 @@ #include "perl.h" #include "XSUB.h" +#define NEED_newCONSTSUB +#define NEED_sv_2pv_nolen #include "ppport.h" #include <fnmatch.h> When I add the +#define NEED_newCONSTSUB +#define NEED_sv_2pv_nolen to FnMatch.xs, then it compiles just fine even with Perl 5.004_05. I don't know if the other advice ppport.h mentions should be followed or not, as I'm not an XS expert. Regards, Blair
[BZAJAC - Fri Mar 25 17:21:11 2005]: Show quoted text
> I'm working on upgrading my Apache::ConfigParser module in CPAN to use > your module to find Apache configuration files that are specified by > an fnmatch regex.. Apache::ConfigParser supports Perl 5.005_03 and > 5.005_04, but these versions cannot build File::FnMatch.
Thanks; will review. -Mike
I've backported as suggested, and tightened format laxity not tolerated by 5.004 POD production (at least, not by default). I'm going to add some "won't work on Win32" disclaimers, and "make test" on 5.[468]. After that, I'll upload 0.2 and resolve this bug. -Mike
[blair@orcaware.com - Tue Mar 29 11:20:19 2005]: Show quoted text
> Regarding fnmatch on Windows, you could grab an implementation from > Apache Portable Runtime with a BSD license or the fnmatch from Linux.
545 compatibility is addressed in 0.02, uploading to CPAN now. Windows is not currently supported. Regards, Mike