Skip Menu |

This queue is for tickets about the XML-Dumper CPAN distribution.

Report information
The Basics
Id: 14502
Status: resolved
Priority: 0/
Queue: XML-Dumper

People
Owner: Nobody in particular
Requestors: dustin.cram [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.76
Fixed in: (no value)



Subject: xml_compare and xml_identity fail when using OO approach
The xml_compare() and xml_identity() functions never shift() in $self. The functions therefore work fine when called as functions, but always return false when called as object methods. Fix: Add the line my $self = ( ref $_[0] && (ref $_[0]) =~ /XML::Dumper/ ) ? shift : $dump; as in xml2pl(), etc. Thanks, Dustin Cram
[guest - Wed Sep 7 18:09:47 2005]: Fixed in XML::Dumper 0.79 Did something that's semantically the same but I think maybe more readable. I look at my old code sometimes and wonder, "what was I thinking?". :) - m. Show quoted text
> The xml_compare() and xml_identity() functions never shift() in $self. > > The functions therefore work fine when called as functions, but always > return false when called as object methods. > > Fix: > > Add the line > > my $self = ( ref $_[0] && (ref $_[0]) =~ /XML::Dumper/ ) ? shift : > $dump; > > as in xml2pl(), etc. > > Thanks, > > Dustin Cram