From: Dobrica Pavlinusic Date: Thu, 21 Jun 2007 10:23:12 +0000 (+0000) Subject: make Data::Dump optional X-Git-Url: http://git.rot13.org/?p=MARC-Fast;a=commitdiff_plain;h=32a687e3527bec06b7a15ccceb53e6ba9f5d272a make Data::Dump optional git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/MARC-Fast/trunk@16 49f9634a-d7ec-0310-8e6b-ec35c6cc8804 --- diff --git a/t/001_marc.t b/t/001_marc.t index 02d75af..3553dc3 100755 --- a/t/001_marc.t +++ b/t/001_marc.t @@ -5,11 +5,16 @@ use blib; use Test::More tests => 40; use Test::Exception; -use Data::Dump qw/dump/; -BEGIN { use_ok( 'MARC::Fast' ); } +BEGIN { + use_ok( 'MARC::Fast' ); +} my $debug = shift @ARGV; +if ( $debug ) { + eval { require Data::Dump; }; + $debug = 0 if ($@); +} my $marc; my %param; @@ -42,7 +47,7 @@ SKIP: { ok($marc->fetch($_), "fetch $_"); ok(my $hash = $marc->to_hash($_), "to_hash $_"); - diag "to_hash($_) = ",dump($hash) if ($debug); + diag "to_hash($_) = ",Data::Dump::dump($hash) if ($debug); ok(my $ascii = $marc->to_ascii($_), "to_ascii $_"); diag "to_ascii($_) ::\n$ascii" if ($debug); }