12.2.  A quick Look at PDFUnit-Perl

PDFUnit-Perl will be available September 2014. That version of PDFUnit contains a Perl module PDF::PDFUnit with all necessary scripts. Together with other CPAN modules e.g. TEST::More or Test::Unit it is easy to write automated tests, which are 100% compatible with PDFUnit-Java.

It is intended to upload PDF::PDFUnit to the CPAN archive.

Here are two simple examples using TEST::More and PDF:PDFUNIT:

#
# Test hasFormat
#
ok(
  com::pdfunit::AssertThat
    ->document("documentInfo/documentInfo_allInfo.pdf")
    ->hasFormat($com::pdfunit::Constants::A4_PORTRAIT)
  , "Document does not have the expected format A4 portrait")
;
#
# Test hasAuthor_WrongValueIntended
#
throws_ok {
  com::pdfunit::AssertThat
    ->document("documentInfo/documentInfo_allInfo.pdf")
    ->hasAuthor()
    ->matchingComplete("wrong-author-intended")
} 'com::pdfunit::errors::PDFUnitValidationException'
,"Test should fail. Demo test with expected exception."
;

A separate documentation covers PDFUnit-Perl.