What version of Test::More? Only the most recent versions can handle circular data structures, so I'd guess you have a circular data structure and an older version,
Fergal On Sun, Jan 23, 2005 at 09:22:19AM -0800, Ovid wrote: > (Aargh! This time I'll send this from the correct email address.) > > Hi all, > > I didn't find that this is a known issue reported somewhere so I > thought I would post it here. > > This program hangs when it hits is_deeply. I eventually get an "out of > memory" error. > > #!/usr/local/bin/perl > use AI::Prolog::Parser; > use AI::Prolog::Term; > use AI::Prolog::Engine; > use Test::More qw/no_plan/; > use Test::Differences; > use Clone qw/clone/; > > my $database = AI::Prolog::Parser->consult(<<'END_PROLOG'); > append([], X, X). > append([W|X],Y,[W|Z]) :- append(X,Y,Z). > END_PROLOG > > my $parser = AI::Prolog::Parser->new("append([a],[b,c,d],Z)."); > my $query = AI::Prolog::Term->new($parser); > my $engine = AI::Prolog::Engine->new($query,$database); > my $cloned_db = clone($database); > eq_or_diff $cloned_db, $database, 'eq_or_diff says they are the > same'; > is_deeply $cloned_db, $database, '... but this hangs'; > > AI::Prolog is not yet on the CPAN, so if someone want's to test this, > they can grab it from > http://users.easystreet.com/ovid/downloads/AI-Prolog-0.01.tar.gz > > I didn't do too much research into this as eq_or_diff() solves my > problem, but we appear to have an infinit loop in Test::More::eq_hash. > > Cheers, > Ovid > > > ===== > If this message is a response to a question on a mailing list, please send > follow up questions to the list. > > Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/