[libpandoc-wrapper-perl] 05/14: make sure to override existing options and output destination (#16)

Jonas Smedegaard dr at jones.dk
Sat Oct 28 01:35:10 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.6.1-1
in repository libpandoc-wrapper-perl.

commit 1f4c7f9c6af6f51e477d18b309eeafb93b06ec57
Author: Jakob Voss <voss at gbv.de>
Date:   Tue Oct 17 20:34:50 2017 +0200

    make sure to override existing options and output destination (#16)
---
 Changes       | 1 +
 lib/Pandoc.pm | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Changes b/Changes
index 3bab3a8..c705ae6 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
 Revision history for Pandoc Perl module
 
 {{$NEXT}}
+    - make sure to override existing options and output destination (#16)
 
 0.6.0  2017-01-27 10:51:10 CET
     - support more expressive version requirements
diff --git a/lib/Pandoc.pm b/lib/Pandoc.pm
index 461a2b5..03a5f52 100644
--- a/lib/Pandoc.pm
+++ b/lib/Pandoc.pm
@@ -148,7 +148,8 @@ sub convert {
     my $utf8 = utf8::is_utf8($in);
 
     my %opts = (in => \$in, out => \$out, err => \$err);
-    my $status = $pandoc->run( [ '-f' => $from, '-t' => $to, @_ ], \%opts );
+    my @args = (@_, '-f' => $from, '-t' => $to, '-o' => '-');
+    my $status = $pandoc->run( \@args, \%opts );
 
     croak($err || "pandoc failed with exit code $status") if $status;
 
@@ -179,7 +180,7 @@ sub file {
     $pandoc->require('1.12.1');
 
     my ($json, $err);
-    my @args = ('-t' => 'json', @_);
+    my @args = (@_, '-t' => 'json', '-o' => '-');
     my $status = $pandoc->run( \@args, out => \$json, err => \$err );
     croak($err || "pandoc failed with exit code $status") if $status;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libpandoc-wrapper-perl.git



More information about the Pkg-perl-cvs-commits mailing list