$fmt //= $devfd >= 0 ? 'json' : (detect_fmt($lei, $dst) or return);
if (index($dst, '://') < 0) { # not a URL, so assume path
- $dst = File::Spec->canonpath($dst);
+ $dst = $lei->canonpath_harder($dst);
} # else URL
my $self = bless { fmt => $fmt, dst => $dst }, $class;
$opt->{alert} //= [ ':WINCH,:bell' ] if -t $lei->{1};
}
}
+ return $lei->fail('--shared is only for v2 inbox output') if
+ $self->{fmt} ne 'v2' && $lei->{opt}->{shared};
$self;
}
} # TODO HTML/Atom/...
}
-# called once by parent (via PublicInbox::EOFpipe)
+# called once by parent (via PublicInbox::PktOp '' => query_done)
sub ovv_end {
my ($self, $lei) = @_;
if ($self->{fmt} eq 'json') {