Skip Menu |
 

This queue is for tickets about the Data-Structure-Util CPAN distribution.

Report information
The Basics
Id: 53813
Status: new
Priority: 0/
Queue: Data-Structure-Util

People
Owner: Nobody in particular
Requestors: cmanley [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.15
Fixed in: (no value)



Subject: Core dump when unblessing a blessed and tied hashref.
Download (untitled) / with headers
text/plain 313b
Tie a hash to 'Tie::IxHash'. Bless the hashref to a package. Call Data::Structure::Util::unbless for the blessed hashref. Perl core dumps. If I do the same using the Acme::Damn damn function instead, then it works as expected. See the attached script that demonstrates the bug. My Perl version is 5.8.8 amd64.
Subject: t.pl
Download t.pl
text/x-perl 745b
# $Id$ use strict; use Acme::Damn qw(damn); use Data::Structure::Util (); use Data::Dumper qw(Dumper); use Tie::IxHash; { package BlessedHashRef; sub new { my $proto = shift; my $hashref = shift; my $class = ref($proto) || $proto; my $self = $hashref; bless($self, $class); return $self; } } my %args; tie(%args, 'Tie::IxHash'); %args = ( 'foo' => 'bar', 'bla' => 'bleh', 'perl' => 'script', 'empty' => undef, ); my $blessed = BlessedHashRef->new(\%args); print Dumper($blessed); print "About to damn using Acme::Damn\n"; my $damned = Acme::Damn::damn($blessed); print Dumper($damned); print "About to unbless using Data::Structure::Util\n"; $damned = Data::Structure::Util::unbless($blessed); print Dumper($damned);


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.