From 9f2d12b96a0cb093fe3d85b60a7c6151d957bc0c Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 3 Mar 2017 20:13:55 +0100 Subject: Pass sub to IPC::Run instead of using a typeglob Signed-off-by: Florian Pritz --- lib/App/BorgRestore/Borg.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/App/BorgRestore/Borg.pm') diff --git a/lib/App/BorgRestore/Borg.pm b/lib/App/BorgRestore/Borg.pm index ebedb7d..412269f 100644 --- a/lib/App/BorgRestore/Borg.pm +++ b/lib/App/BorgRestore/Borg.pm @@ -3,7 +3,7 @@ use v5.10; use warnings; use strict; -use IPC::Run qw(run start); +use IPC::Run qw(run start new_chunker); sub new { my $class = shift; @@ -41,9 +41,9 @@ sub restore { sub list_archive { my $self = shift; my $archive = shift; - my $fh = shift; + my $cb = shift; - return start [qw(borg list --list-format), '{isomtime} {path}{NEWLINE}', "::".$archive], ">pipe", $fh; + return start [qw(borg list --list-format), '{isomtime} {path}{NEWLINE}', "::".$archive], ">", new_chunker, $cb; } 1; -- cgit v1.2.3-24-g4f1b