On Sun, 13 Sep 2009 11:12:38 +0100, Tim Bunce <tim.bu...@pobox.com>
wrote:

Is it OK with you if I upgrade DBI to be using the Devel::PPPort-3.19,
so we're more compatible with more recent perl's?

This is quite a big change if I follow all the advices

File needs grok_number, adding static request
File needs grok_numeric_radix, adding static request
Files [./DBI.xs ./Driver_xst.h] need newRV_noinc, adding global request
Files [./DBI.xs ./DBIXS.h] need sv_2pv_flags, adding global request

just one chunk:
@@ -1227,12 +1232,12 @@
     dbih_imp_sv = dbih_make_com(parent, parent_imp, imp_class, 0, 0, 
dbi_imp_data);
     imp = (imp_xxh_t*)(void*)SvPVX(dbih_imp_sv);

-    dbih_imp_rv = newRV(dbih_imp_sv);  /* just needed for sv_bless */
+    dbih_imp_rv = newRV_inc(dbih_imp_sv);      /* just needed for sv_bless */
     sv_bless(dbih_imp_rv, imp_mem_stash);
     sv_free(dbih_imp_rv);

     DBIc_MY_H(imp) = (HV*)SvRV(orv);   /* take _copy_ of pointer, not new ref 
*/
-    DBIc_IMP_DATA(imp) = (imp_datasv) ? newSVsv(imp_datasv) : &sv_undef;
+    DBIc_IMP_DATA(imp) = (imp_datasv) ? newSVsv(imp_datasv) : &PL_sv_undef;

     if (DBIc_TYPE(imp) <= DBIt_ST) {
        SV **tmp_svp;

> On Sat, Sep 12, 2009 at 02:39:48AM -0700, hmbr...@cvs.perl.org wrote:
> > Author: hmbrand
> > Date: Sat Sep 12 02:39:44 2009
> > New Revision: 13312
> > 
> > Modified:
> >    dbi/trunk/DBI.xs
> > 
> > Log:
> > perl-5.10.x sets filename to "*main::STDERR" when using 'DBI->trace (0, 
> > *STDERR);'
> > 
> > Modified: dbi/trunk/DBI.xs
> > ==============================================================================
> > --- dbi/trunk/DBI.xs        (original)
> > +++ dbi/trunk/DBI.xs        Sat Sep 12 02:39:44 2009
> > @@ -814,7 +814,8 @@
> >      else {
> >     filename = (SvOK(file)) ? SvPV_nolen(file) : Nullch;
> >     /* undef arg == reset back to stderr */
> > -   if (!filename || strEQ(filename,"STDERR")) {
> > +   if (!filename || strEQ(filename,"STDERR")
> > +                 || strEQ(filename,"*main::STDERR")) {
> >         close_trace_file(aTHX);
> >         DBILOGFP = PerlIO_stderr();
> 
> Wouldn't it be better to detect when a glob is being passed and use the
> filehandle in the glob? That way it would work for any *FOO fh.
> 
> Tim.


-- 
H.Merijn Brand  http://tux.nl      Perl Monger  http://amsterdam.pm.org/
using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/

Reply via email to