From: Graham B. <gb...@us...> - 2003-05-12 17:06:13
|
Update of /cvsroot/perl-ldap/asn/t In directory sc8-pr-cvs1:/tmp/cvs-serv10532/t Modified Files: funcs.pl Log Message: Skip rtest if Data::Dumper is not available Index: funcs.pl =================================================================== RCS file: /cvsroot/perl-ldap/asn/t/funcs.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- funcs.pl 7 May 2003 15:13:28 -0000 1.5 +++ funcs.pl 12 May 2003 17:06:10 -0000 1.6 @@ -34,11 +34,15 @@ $_[1] } -use Data::Dumper; sub rtest ($$$) { + unless (eval { require Data::Dumper } ) { + print "ok $_[0] # skip need Data::Dumper\n"; + return; + } + local $Data::Dumper::Sortkeys = 1; - my $ok = Dumper($_[1]) eq Dumper($_[2]); + my $ok = Data::Dumper::Dumper($_[1]) eq Data::Dumper::Dumper($_[2]); unless ($ok) { printf "#line %d %s\n",(caller)[2,1]; |