Charles Jardine wrote: > I have been testing my mod_perl-1.26 applications under perl 5.7.3. > > I have discovered that the tying of STDIN and STDOUT does not work.
Great work, Charles! the output of 'diff -u' is a preffered format for patches :) [snip] > This > patch makes mod_perl work with 5.7.3, but, of course, stops it > working with 5.6.x. It is beyond my knowledge to make this patch > version dependent, as it needs to be. here is the one that works for all 5.x versions. Tested with 5.7.3 and 5.6.1. Index: src/modules/perl/perlio.c =================================================================== RCS file: /home/cvs/modperl/src/modules/perl/perlio.c,v retrieving revision 1.7 diff -u -r1.7 perlio.c --- src/modules/perl/perlio.c 13 Jun 2001 21:27:51 -0000 1.7 +++ src/modules/perl/perlio.c 18 Mar 2002 15:48:39 -0000 @@ -51,12 +51,25 @@ #define dHANDLE(name) GV *handle = gv_fetchpv(name, TRUE, SVt_PVIO) +#if (PERL_REVISION == 5 && PERL_VERSION < 7) + #define TIEHANDLE(name,obj) \ { \ dHANDLE(name); \ sv_unmagic((SV*)handle, 'q'); \ sv_magic((SV*)handle, obj, 'q', Nullch, 0); \ } + +#else + +#define TIEHANDLE(name,obj) \ +{ \ + dHANDLE(name); \ + sv_unmagic((SV*)GvIOp((SV*)handle), 'q'); \ + sv_magic((SV*)GvIOp((SV*)handle), obj, 'q', Nullch, 0); \ +} + +#endif #if 0 #define TIED tied_handle _____________________________________________________________________ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/