make CAM::PDF really optional
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 22 Sep 2008 15:34:42 +0000 (15:34 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 22 Sep 2008 15:34:42 +0000 (15:34 +0000)
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@1117 07558da8-63fa-0310-ba24-9fe276d99e06

t/2-input-pdf.t

index 6a2151a..84b5697 100755 (executable)
@@ -3,11 +3,20 @@
 use strict;
 use blib;
 
-use Test::More tests => 11;
+use Test::More;
 
 BEGIN {
-use_ok( 'WebPAC::Test' );
-use_ok( 'WebPAC::Input' );
+
+       eval "use CAM::PDF";
+
+       if ( $@ ) {
+               plan skip_all => "CAM::PDF required for WebPAC::Input::PDF";
+       } else {
+               plan tests => 11;
+       }
+
+       use_ok( 'WebPAC::Test' );
+       use_ok( 'WebPAC::Input' );
 }
 
 my $module = 'WebPAC::Input::PDF';