use strict; use warnings; package Test::Deep::Code 1.204; use Test::Deep::Cmp; sub init { my $self = shift; my $code = shift || die "No coderef supplied"; $self->{code} = $code; } sub descend { my $self = shift; my $got = shift; my ($ok, $diag) = &{$self->{code}}($got); $self->data->{diag} = $diag; return $ok; } sub diagnostics { my $self = shift; my ($where, $last) = @_; my $error = $last->{diag}; my $data = Test::Deep::render_val($last->{got}); my $diag = < =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2003 by Fergal Daly. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut