Skip Menu |

This queue is for tickets about the Tie-Watch CPAN distribution.

Report information
The Basics
Id: 18930
Status: new
Priority: 0/
Queue: Tie-Watch

People
Owner: Nobody in particular
Requestors: steffen [...] genua.de
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 1.0
  • 1.1
  • 1.2
Fixed in: (no value)



Subject: Tie::Watch::{Array,Hash}::Clear is broken (sets shadow object to undef, instead of clearing the array|hash)
package Tie::Watch::Array; ... sub Clear {$_[0]->{-ptr} = ()} This does not clear the array in -ptr but sets -ptr to undef. It must be sub Clear { @{ $_[0]->{-ptr} } = () } same with Tie::Watch::Hash::Clear, it must be sub Clear { %{ $_[0]->{-ptr} } = () } This croaks with 1.0 if one clears an array and later tries to access it, because $_[0]->{-ptr} is no longer an array-ref (but undef) and cannot be dereferenced. Looking at the code of 1.2 the Bug seems to be still there, so I assume its there and in 1.1 too.