develooper Front page | perl.perl5.porters | Postings from September 2001

Re: error dereferencing array in a tied hash

Thread Previous
Michael G Schwern
September 29, 2001 10:46
Re: error dereferencing array in a tied hash
Message ID:
On Sat, Sep 29, 2001 at 09:09:40AM -0400, Steve Sapovits wrote:
> I have a hash tying package that works EXCEPT when references
> are returned and used in block constructs like this:
>    my $h = {};
>    tie %$h, "MyTie";
>    $h->{KEY} = [];
>    push(@{$h->{KEY}}, (qw/foo bar/));  # THIS FAILS

Given that this code works:

    use Tie::Hash;
    my $h = {};
    tie %$h, "Tie::StdHash" or die;
    $h->{KEY} = [];
    push(@{$h->{KEY}}, (qw/foo bar/));
    print "@{$h->{KEY}}\n";

and not being able to see your code, I can only assume the problem is
in your implementation.  Sorry. :(

> This Tie relies on lots of internal code so I can't post it.  I also
> can't reproduce the problem with a smaller tie.


Michael G. Schwern   <>
Perl6 Quality Assurance     <>	     Kwalitee Is Job One
Your average appeasement engineer is about as clued-up on computers as
the average computer "hacker" is about B.O.
	-- BOFH

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About