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

Owner: Nobody in particular
Requestors: cmanley [...]

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.
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 infrastructure.

Please report any issues with to