On Sun, Sep 13, 2009 at 12:26:57PM +0200, H.Merijn Brand wrote:
> On Sun, 13 Sep 2009 11:12:38 +0100, Tim Bunce <tim.bu...@pobox.com>
> > > - if (!filename || strEQ(filename,"STDERR")) {
> > > + if (!filename || strEQ(filename,"STDERR")
> > > +               || strEQ(filename,"*main::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.
> 
> That's what Nick said too. I am looking onto this, but as STDERR was
> being referred to here specifically, I thought this at least fixes the
> special case for all backwards compatibility issues. (My tests suddenly
> started creating files with the name "*main::STDERR", and upgrading DBI
> is way easier than upgrading perl.

I'd be as happy for names starting with * to trigger a warning.

> Feel free to beat me in doing it right though.

That's not going to happen :) NYTProf v3 and java2perl6 have a higher
priority call on my limited free time at the momement, along with a
bunch of conferences in the next few weeks, so I'm especially grateful
for any help with DBI.

> 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?

Yes, please do.

> 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_rv = newRV(dbih_imp_sv);  /* just needed for sv_bless */
> +    dbih_imp_rv = newRV_inc(dbih_imp_sv);      /* just needed for sv_bless */

> -    DBIc_IMP_DATA(imp) = (imp_datasv) ? newSVsv(imp_datasv) : &sv_undef;
> +    DBIc_IMP_DATA(imp) = (imp_datasv) ? newSVsv(imp_datasv) : &PL_sv_undef;

That's fine.

Driver authors should do the same, of course, but I don't think they'll
be any problems if DBI does but they don't.

> $ git status
> 
> also shows me that t/zv* is not tracked. Is that correct in svn too?

Yes. They get deleted by make clean.

Thanks!

Tim.

p.s. Don't forget to credit yourself in the Changes file!

Reply via email to