in reply to Re: XMLout $self hash
in thread XMLout $self hash

Thanks, your comment made me, finally, realize the error in my code

First I want to apologize for not posting correct code, but I am unable to disclose the code i am workning with right now

So, the problem rised when in the object I had..

sub new { ... $self = { ... _IP => undef, ... } bless ($self, $class); return $self; } sub set_ip { my ($self,$ip) = @_; $self->{_IP} = new Net::IP($ip) or die (Net::IP::Error()); }

The problem here is that Net::IP does not overload the method '==' so XMLout explodes at line 1406 in Simple.pm.

if(grep($_ == $ref, @{$self->{_ancestors}}));

You can see this line is trying to look for references to the present node (circular references)

So either a) overload '==' at XML::Simple b) Instead of using Net::IP use simple strings c) comment lines 1405 and 1406

Thanks