]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiOverview.pm
get rid of unnecessary bytes::length usage
[public-inbox.git] / lib / PublicInbox / LeiOverview.pm
index bfb8b1435ff25f21e5ea603138d8138c5eab964b..223db22244eca51cf9554c76d685f4625d02e88a 100644 (file)
@@ -76,7 +76,7 @@ sub new {
        $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;
@@ -108,6 +108,8 @@ sub new {
                        $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;
 }
 
@@ -119,7 +121,7 @@ sub ovv_begin {
        } # 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') {