Make test of 1.52 failed on childhandles

Make test of 1.52 failed on childhandles

am 01.09.2006 17:30:06 von clive

Hi -

I just got DBI 1.52 out, and the make test stage failed on childhandles.
This is on AIX 5.3, perl 5.8.2 built for aix-thread-multi.

t/zvpp_72childhandles....1..14
ok 1
ok 2
not ok 3
not ok 4
ok 5 - All handles should be undef now
ok 6 - ChildHandles should be an array-ref if wekref is available
not ok 7
drh DBI::dr=HASH(0x3018cb8c)
not ok 8
ok 9
not ok 10
not ok 11
ok 12 - handles should be gone now
ok 13
ok 14

Is this supposed to happen?

cheers,
clive

Re: Make test of 1.52 failed on childhandles

am 04.09.2006 00:16:02 von Tim.Bunce

Did t/72childhandles also fail, or was it
only t/zvpp_72childhandles?

Both t/72childhandles.t and lib/DBI/PurePerl.pm use the same code to
decide if there's a working Scalar::Util::weaken() available:

my $HAS_WEAKEN = eval {
require Scalar::Util;
# this will croak() if this Scalar::Util doesn't have a working weaken().
Scalar::Util::weaken(my $test = \"foo");
1;
};

Could you look into this further for me? Adding a
warn $HAS_WEAKEN;
after that code in both t/72childhandles.t and lib/DBI/PurePerl.pm
would be a good place to start.

Thanks!

Tim.

On Fri, Sep 01, 2006 at 04:30:06PM +0100, Clive George wrote:
> Hi -
>
> I just got DBI 1.52 out, and the make test stage failed on childhandles.
> This is on AIX 5.3, perl 5.8.2 built for aix-thread-multi.
>
> t/zvpp_72childhandles....1..14
> ok 1
> ok 2
> not ok 3
> not ok 4
> ok 5 - All handles should be undef now
> ok 6 - ChildHandles should be an array-ref if wekref is available
> not ok 7
> drh DBI::dr=HASH(0x3018cb8c)
> not ok 8
> ok 9
> not ok 10
> not ok 11
> ok 12 - handles should be gone now
> ok 13
> ok 14
>
> Is this supposed to happen?
>
> cheers,
> clive
>

Re: Make test of 1.52 failed on childhandles

am 04.09.2006 03:29:53 von clive

t/72childhandles works fine - the warn $HAS_WEAKEN says "1 at
t/72childhandles.t line 19.".

The zvpp ones give

Use of uninitialized value in warn at
/home/cg5/DBI-1.52/blib/lib/DBI/PurePerl.pm line 49.
Modification of a read-only value attempted at
/home/cg5/DBI-1.52/blib/lib/DBI/PurePerl.pm line 45.
...caught at /home/cg5/DBI-1.52/blib/lib/DBI/PurePerl.pm line 49.

when I added the warn $HAS_WEAKEN to line 49. (line 45 is
Scalar::Util::weaken(my $test = \"foo"); ).

Ah - t/72childhandles.t doesn't actually have the same code as PurePerl.pm

my $HAS_WEAKEN = eval {
require Scalar::Util;
# this will croak() if this Scalar::Util doesn't have a working
weaken().
Scalar::Util::weaken( \my $test ); # same test as in DBI.pm
1;
};

vs

# check for weaken support, used by ChildHandles
my $HAS_WEAKEN = eval {
require Scalar::Util;
# this will croak() if this Scalar::Util doesn't have a working
weaken().
Scalar::Util::weaken(my $test = \"foo");
1;
};

So which one is correct?

(We've got Scalar::Util 1.13 - looking at the change log for this hints that
weaken hasn't changed in the later versions - should I try 1.18 anyway?)

cheers,
clive

----- Original Message -----
From: "Tim Bunce"
To: "Clive George"
Cc:
Sent: Sunday, September 03, 2006 11:16 PM
Subject: Re: Make test of 1.52 failed on childhandles


> Did t/72childhandles also fail, or was it
> only t/zvpp_72childhandles?
>
> Both t/72childhandles.t and lib/DBI/PurePerl.pm use the same code to
> decide if there's a working Scalar::Util::weaken() available:
>
> my $HAS_WEAKEN = eval {
> require Scalar::Util;
> # this will croak() if this Scalar::Util doesn't have a working
> weaken().
> Scalar::Util::weaken(my $test = \"foo");
> 1;
> };
>
> Could you look into this further for me? Adding a
> warn $HAS_WEAKEN;
> after that code in both t/72childhandles.t and lib/DBI/PurePerl.pm
> would be a good place to start.
>
> Thanks!
>
> Tim.
>
> On Fri, Sep 01, 2006 at 04:30:06PM +0100, Clive George wrote:
>> Hi -
>>
>> I just got DBI 1.52 out, and the make test stage failed on childhandles.
>> This is on AIX 5.3, perl 5.8.2 built for aix-thread-multi.
>>
>> t/zvpp_72childhandles....1..14
>> ok 1
>> ok 2
>> not ok 3
>> not ok 4
>> ok 5 - All handles should be undef now
>> ok 6 - ChildHandles should be an array-ref if wekref is available
>> not ok 7
>> drh DBI::dr=HASH(0x3018cb8c)
>> not ok 8
>> ok 9
>> not ok 10
>> not ok 11
>> ok 12 - handles should be gone now
>> ok 13
>> ok 14
>>
>> Is this supposed to happen?
>>
>> cheers,
>> clive
>>
> --
> This email has been verified as Virus free
> Virus Protection and more available at http://www.plus.net

Re: Make test of 1.52 failed on childhandles

am 04.09.2006 12:37:51 von Tim.Bunce

Ah. Thanks. Try changing both to use

Scalar::Util::weaken( my $test = [] );

Tim.

On Mon, Sep 04, 2006 at 02:29:53AM +0100, Clive George wrote:
> t/72childhandles works fine - the warn $HAS_WEAKEN says "1 at
> t/72childhandles.t line 19.".
>
> The zvpp ones give
>
> Use of uninitialized value in warn at
> /home/cg5/DBI-1.52/blib/lib/DBI/PurePerl.pm line 49.
> Modification of a read-only value attempted at
> /home/cg5/DBI-1.52/blib/lib/DBI/PurePerl.pm line 45.
> ...caught at /home/cg5/DBI-1.52/blib/lib/DBI/PurePerl.pm line 49.
>
> when I added the warn $HAS_WEAKEN to line 49. (line 45 is
> Scalar::Util::weaken(my $test = \"foo"); ).
>
> Ah - t/72childhandles.t doesn't actually have the same code as PurePerl.pm
>
> my $HAS_WEAKEN = eval {
> require Scalar::Util;
> # this will croak() if this Scalar::Util doesn't have a working
> weaken().
> Scalar::Util::weaken( \my $test ); # same test as in DBI.pm
> 1;
> };
>
> vs
>
> # check for weaken support, used by ChildHandles
> my $HAS_WEAKEN = eval {
> require Scalar::Util;
> # this will croak() if this Scalar::Util doesn't have a working
> weaken().
> Scalar::Util::weaken(my $test = \"foo");
> 1;
> };
>
> So which one is correct?
>
> (We've got Scalar::Util 1.13 - looking at the change log for this hints
> that weaken hasn't changed in the later versions - should I try 1.18
> anyway?)
>
> cheers,
> clive
>
> ----- Original Message -----
> From: "Tim Bunce"
> To: "Clive George"
> Cc:
> Sent: Sunday, September 03, 2006 11:16 PM
> Subject: Re: Make test of 1.52 failed on childhandles
>
>
> >Did t/72childhandles also fail, or was it
> >only t/zvpp_72childhandles?
> >
> >Both t/72childhandles.t and lib/DBI/PurePerl.pm use the same code to
> >decide if there's a working Scalar::Util::weaken() available:
> >
> >my $HAS_WEAKEN = eval {
> > require Scalar::Util;
> > # this will croak() if this Scalar::Util doesn't have a working
> >weaken().
> > Scalar::Util::weaken(my $test = \"foo");
> > 1;
> >};
> >
> >Could you look into this further for me? Adding a
> >warn $HAS_WEAKEN;
> >after that code in both t/72childhandles.t and lib/DBI/PurePerl.pm
> >would be a good place to start.
> >
> >Thanks!
> >
> >Tim.
> >
> >On Fri, Sep 01, 2006 at 04:30:06PM +0100, Clive George wrote:
> >>Hi -
> >>
> >>I just got DBI 1.52 out, and the make test stage failed on childhandles.
> >>This is on AIX 5.3, perl 5.8.2 built for aix-thread-multi.
> >>
> >>t/zvpp_72childhandles....1..14
> >>ok 1
> >>ok 2
> >>not ok 3
> >>not ok 4
> >>ok 5 - All handles should be undef now
> >>ok 6 - ChildHandles should be an array-ref if wekref is available
> >>not ok 7
> >>drh DBI::dr=HASH(0x3018cb8c)
> >>not ok 8
> >>ok 9
> >>not ok 10
> >>not ok 11
> >>ok 12 - handles should be gone now
> >>ok 13
> >>ok 14
> >>
> >>Is this supposed to happen?
> >>
> >>cheers,
> >>clive
> >>
> >--
> >This email has been verified as Virus free
> >Virus Protection and more available at http://www.plus.net
>

Re: Make test of 1.52 failed on childhandles

am 04.09.2006 13:04:13 von clive

Yup, that worked - now reporting 1 for both t/72 and PurePerl.pm, and passed
the tests fine.

cheers,
clive

----- Original Message -----
From: "Tim Bunce"
To: "Clive George"
Cc: "Tim Bunce" ;
Sent: Monday, September 04, 2006 11:37 AM
Subject: Re: Make test of 1.52 failed on childhandles


> Ah. Thanks. Try changing both to use
>
> Scalar::Util::weaken( my $test = [] );
>
> Tim.
>
> On Mon, Sep 04, 2006 at 02:29:53AM +0100, Clive George wrote:
>> t/72childhandles works fine - the warn $HAS_WEAKEN says "1 at
>> t/72childhandles.t line 19.".
>>
>> The zvpp ones give
>>
>> Use of uninitialized value in warn at
>> /home/cg5/DBI-1.52/blib/lib/DBI/PurePerl.pm line 49.
>> Modification of a read-only value attempted at
>> /home/cg5/DBI-1.52/blib/lib/DBI/PurePerl.pm line 45.
>> ...caught at /home/cg5/DBI-1.52/blib/lib/DBI/PurePerl.pm line 49.
>>
>> when I added the warn $HAS_WEAKEN to line 49. (line 45 is
>> Scalar::Util::weaken(my $test = \"foo"); ).
>>
>> Ah - t/72childhandles.t doesn't actually have the same code as
>> PurePerl.pm
>>
>> my $HAS_WEAKEN = eval {
>> require Scalar::Util;
>> # this will croak() if this Scalar::Util doesn't have a working
>> weaken().
>> Scalar::Util::weaken( \my $test ); # same test as in DBI.pm
>> 1;
>> };
>>
>> vs
>>
>> # check for weaken support, used by ChildHandles
>> my $HAS_WEAKEN = eval {
>> require Scalar::Util;
>> # this will croak() if this Scalar::Util doesn't have a working
>> weaken().
>> Scalar::Util::weaken(my $test = \"foo");
>> 1;
>> };
>>
>> So which one is correct?
>>
>> (We've got Scalar::Util 1.13 - looking at the change log for this hints
>> that weaken hasn't changed in the later versions - should I try 1.18
>> anyway?)
>>
>> cheers,
>> clive
>>
>> ----- Original Message -----
>> From: "Tim Bunce"
>> To: "Clive George"
>> Cc:
>> Sent: Sunday, September 03, 2006 11:16 PM
>> Subject: Re: Make test of 1.52 failed on childhandles
>>
>>
>> >Did t/72childhandles also fail, or was it
>> >only t/zvpp_72childhandles?
>> >
>> >Both t/72childhandles.t and lib/DBI/PurePerl.pm use the same code to
>> >decide if there's a working Scalar::Util::weaken() available:
>> >
>> >my $HAS_WEAKEN = eval {
>> > require Scalar::Util;
>> > # this will croak() if this Scalar::Util doesn't have a working
>> >weaken().
>> > Scalar::Util::weaken(my $test = \"foo");
>> > 1;
>> >};
>> >
>> >Could you look into this further for me? Adding a
>> >warn $HAS_WEAKEN;
>> >after that code in both t/72childhandles.t and lib/DBI/PurePerl.pm
>> >would be a good place to start.
>> >
>> >Thanks!
>> >
>> >Tim.
>> >
>> >On Fri, Sep 01, 2006 at 04:30:06PM +0100, Clive George wrote:
>> >>Hi -
>> >>
>> >>I just got DBI 1.52 out, and the make test stage failed on
>> >>childhandles.
>> >>This is on AIX 5.3, perl 5.8.2 built for aix-thread-multi.
>> >>
>> >>t/zvpp_72childhandles....1..14
>> >>ok 1
>> >>ok 2
>> >>not ok 3
>> >>not ok 4
>> >>ok 5 - All handles should be undef now
>> >>ok 6 - ChildHandles should be an array-ref if wekref is available
>> >>not ok 7
>> >>drh DBI::dr=HASH(0x3018cb8c)
>> >>not ok 8
>> >>ok 9
>> >>not ok 10
>> >>not ok 11
>> >>ok 12 - handles should be gone now
>> >>ok 13
>> >>ok 14
>> >>
>> >>Is this supposed to happen?
>> >>
>> >>cheers,
>> >>clive
>> >>
>> >--
>> >This email has been verified as Virus free
>> >Virus Protection and more available at http://www.plus.net
>>
> --
> This email has been verified as Virus free
> Virus Protection and more available at http://www.plus.net