<pre style='margin:0'>
David B. Evans (dbevans) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/853fb8c177dcd0f63626371c57b4f7a927eb0ea7">https://github.com/macports/macports-ports/commit/853fb8c177dcd0f63626371c57b4f7a927eb0ea7</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 853fb8c p5-poppler: various bug fixes and updates, rebuild
</span>853fb8c is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 853fb8c177dcd0f63626371c57b4f7a927eb0ea7
</span>Author: David B. Evans <devans@macports.org>
AuthorDate: Tue May 7 03:29:24 2019 -0700
<span style='display:block; white-space:pre;color:#404040;'> p5-poppler: various bug fixes and updates, rebuild
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> * apply upstream bug fixes through unpublished release v1.0102
</span><span style='display:block; white-space:pre;color:#404040;'> * don't install outdated/inappropriate poppler typelib from distribution
</span><span style='display:block; white-space:pre;color:#404040;'> * use poppler's currently installed typelib instead
</span><span style='display:block; white-space:pre;color:#404040;'> * update dependencies, license, add noarch
</span>---
perl/p5-poppler/Portfile | 23 ++-
.../p5-poppler/files/patch-use-system-typelib.diff | 23 +++
perl/p5-poppler/files/patch-v1.0102.diff | 161 +++++++++++++++++++++
3 files changed, 203 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/perl/p5-poppler/Portfile b/perl/p5-poppler/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 137b7c0..b08bbca 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/perl/p5-poppler/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/perl/p5-poppler/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4,25 +4,40 @@ PortSystem 1.0
</span> PortGroup perl5 1.0
perl5.branches 5.26 5.28
<span style='display:block; white-space:pre;background:#ffe0e0;'>-perl5.setup Poppler 1.0101 ../by-authors/id/V/VO/VOLKENING
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+perl5.setup Poppler 1.0101 ../../authors/id/V/VO/VOLKENING
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 3
</span> platforms darwin
maintainers {devans @dbevans} openmaintainer
<span style='display:block; white-space:pre;background:#ffe0e0;'>-license LGPL-2.1+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license {Artistic-1 GPL}
</span>
description Perl bindings for the poppler library
long_description ${description}
checksums rmd160 09c14794efee274cfb1a62a071bdcf587edea4e8 \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 a64570f5a4671ea7c96f83c4a49eb903829bfd2b819d30aef4cae99210542a03
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 a64570f5a4671ea7c96f83c4a49eb903829bfd2b819d30aef4cae99210542a03 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 44242
</span>
if {${perl5.major} != ""} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:p${perl5.major}-extutils-pkgconfig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> depends_lib-append \
port:poppler \
port:p${perl5.major}-cairo \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:p${perl5.major}-cairo-gobject \
</span> port:p${perl5.major}-file-sharedir \
port:p${perl5.major}-glib-object-introspection \
port:p${perl5.major}-uri
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # apply upstream bug fixes through unpublished v1.0102
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-v1.0102.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # don't install outdated/inappropriate poppler typelib from distribution
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # use poppler's currently installed typelib instead
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-use-system-typelib.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> perl5.use_module_build
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ supported_archs noarch
</span> }
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/perl/p5-poppler/files/patch-use-system-typelib.diff b/perl/p5-poppler/files/patch-use-system-typelib.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..bee1ca6
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/perl/p5-poppler/files/patch-use-system-typelib.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,23 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Build.PL.orig 2016-01-10 22:06:24.000000000 -0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Build.PL 2019-05-07 12:37:11.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -44,6 +44,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ },
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ add_to_cleanup => [ 'Poppler-*' ],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ create_license => 1,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- share_dir => 'share',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# don't install outdated/inappropriate poppler typelib from distribution ./share
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# share_dir => 'share',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $builder->create_build_script;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- lib/Poppler.pm.orig 2019-05-07 01:09:39.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ lib/Poppler.pm 2019-05-07 01:11:20.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -204,7 +204,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sub import {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Glib::Object::Introspection->setup (
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- search_path => File::ShareDir::dist_dir('Poppler'),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# use default search_path to find poppler's currently installed typelib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# search_path => File::ShareDir::dist_dir('Poppler'),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ basename => $_POPPLER_BASENAME,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ version => $_POPPLER_VERSION,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ package => $_POPPLER_PACKAGE,
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/perl/p5-poppler/files/patch-v1.0102.diff b/perl/p5-poppler/files/patch-v1.0102.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..50912f9
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/perl/p5-poppler/files/patch-v1.0102.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,161 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/Changes b/Changes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0c015b2..650244c 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Changes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Changes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Revision history for Perl extension Poppler.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++1.0102 Sun Apr 10 13:21:00 2016
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ - Fixed new_from_data() constructor
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++1.0101 Sun Jan 10 23:03:01 2016
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ - Fixed minimum URI version and repository URL in Build.PL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1.01 Sun Jan 03 14:13:00 2016
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - major re-write to utilize GObject introspection
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/Poppler.pm b/lib/Poppler.pm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 842a123..7abc6bc 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- lib/Poppler.pm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ lib/Poppler.pm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,6 +1,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ package Poppler;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-our $VERSION = "1.0101";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++our $VERSION = "1.0102";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $VERSION = eval $VERSION;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ =encoding utf8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -13,40 +13,42 @@ Poppler - Bindings to the poppler PDF rendering library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ use Poppler;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # initialize using filename
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- my $pdf = Poppler::Document->new_from_file( 'file.pdf' );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ use strict;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ use warnings;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # or, initialize using scalar data
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- open my $fh, '<:raw', 'file.pdf';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- read ($fh, my $data, -s 'file.pdf')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- close $fh;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- my $pdf = Poppler::Document->new_from_data( $data );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # initialize using filename
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my $pdf = Poppler::Document->new_from_file( $ARGV[0] );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # get some general info
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- my $n_pages = $pdf->get_n_pages;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- my $title = $pdf->get_title;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ print "Pages : ", $pdf->get_n_pages, "\n";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ print "Title : ", $pdf->get_title, "\n";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # etc ...
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # get the first page
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- my $page = $pdf->get_page( 0 );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my $page = $pdf->get_page(0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # get page size
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- my ($w, $h) = $page->get_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # get page size the simple way
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my ($w, $h) = $page->get_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ print "Dims1 : $w x $h\n";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # or, for backward compatibility
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ my $dims = $page->get_size; # a Poppler::Dimension object
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- my $w = $dims->get_width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- my $h = $dims->get_height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $w = $dims->get_width;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $h = $dims->get_height;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ print "Dims2 : $w x $h\n";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # do other fancy things (get page links, annotations, movies, etc)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # (see poppler-glib documentation for details)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # render to a Cairo surface
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- use Cairo;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- my $surface = Cairo::ImageSurface->create( 'argb32', 100, 100 );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- my $cr = Cairo::Context->create( $surface );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- $page->render_to_cairo( $cr );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- $cr->show_page;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ use Cairo::GObject;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my ($w_px, $h_px) = map {$_ * 96/72 } ($w,$h); # points to pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my $surface = Cairo::ImageSurface->create( 'argb32', $w_px, $h_px );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my $context = Cairo::Context->create( $surface );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $context->scale(96/72, 96/72); # points to pixels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $page->render( $context );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $context->show_page;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $surface->write_to_png( $ARGV[1] );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ =head1 ABSTRACT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -285,6 +287,42 @@ sub Poppler::Page::get_size {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++sub Poppler::Document::new_from_data {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my ($class, $data, $len, $pwd) = @_;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #-----------------------------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # this is how it should be done, but can't get it to work yet
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #-----------------------------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #$data = _unpack_unless_array_ref( $data );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #$len = scalar(@$data);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #return Glib::Object::Introspection->invoke (
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #$_POPPLER_BASENAME, 'Document', 'new_from_data',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #$class, $data, $len
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #-----------------------------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # this is an ugly hack to make things work
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #-----------------------------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ use File::Temp;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my $tmp = File::Temp->new( UNLINK => 1 );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ print {$tmp} $data;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ close $tmp;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return Poppler::Document->new_from_file("$tmp", $pwd);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++sub _unpack_unless_array_ref {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ my ($data) = @_;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ local $@;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return eval { @{$data} }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ? $data
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ : [unpack 'C*', $data];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ =back
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ =cut
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/t/poppler.t b/t/poppler.t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 2957681..bf2070d 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- t/poppler.t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ t/poppler.t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -14,7 +14,8 @@ require_ok ("Poppler");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ my $fn1 = 'test.pdf';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-ok (my $pdf = Poppler::Document->new_from_file($fn1), "loaded new Document");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ok (my $pdf = Poppler::Document->new_from_file($fn1),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "loaded new Document from filename");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ok ($pdf->get_author eq 'Jane Doe', "author matched");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ok ($pdf->get_creator eq 'John Doe', "creator matched");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ok ($pdf->get_producer eq 'some-program', "producer matched");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -41,5 +42,13 @@ ok (my $p2 = $pdf->get_page(1), "fetched second page");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ok (! $p2->find_text('BAR'), "no match second page");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ok ($p2->find_text('BAZ'), "yes match second page");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# test new_from_data()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++my $size = -s $fn1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++open my $in, '<:raw', $fn1 or die "Error opening test file for reading: $@";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++my $r = read($in, my $data, $size) or die "Error reading raw data: $@";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ok ($pdf = Poppler::Document->new_from_data($data),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "loaded new Document from data");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ok ($pdf->get_author eq 'Jane Doe', "author matched");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ done_testing();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit;
</span></pre><pre style='margin:0'>
</pre>