X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FViewVCS.pm;h=6365f04547bca74359c611ea307a9b4f8f2f10be;hb=5c8909925072804901e9c3b45bbf25446d379e7b;hp=87927d5eaf3e7726ce123574fc95dc3a4c6e3b20;hpb=1bfff88a34210d5e944424c3a96e4d60979ace4d;p=public-inbox.git diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index 87927d5e..6365f045 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2019-2020 all contributors +# Copyright (C) 2019-2021 all contributors # License: AGPL-3.0+ # show any VCS object, similar to "git show" @@ -15,8 +15,7 @@ package PublicInbox::ViewVCS; use strict; -use warnings; -use bytes (); # only for bytes::length +use v5.10.1; use PublicInbox::SolverGit; use PublicInbox::WwwStream qw(html_oneshot); use PublicInbox::Linkify; @@ -49,7 +48,7 @@ sub stream_blob_parse_hdr { # {parse_hdr} for Qspawn } elsif (index($$bref, "\0") >= 0) { [200, [qw(Content-Type application/octet-stream), @cl] ]; } else { - my $n = bytes::length($$bref); + my $n = length($$bref); if ($n >= $BIN_DETECT || $n == $size) { return [200, [ 'Content-Type', 'text/plain; charset=UTF-8', @cl ] ]; @@ -197,7 +196,7 @@ sub show ($$;$) { $ctx->{'log'} = tmpfile("solve.$oid_b"); $ctx->{fn} = $fn; - my $solver = PublicInbox::SolverGit->new($ctx->{-inbox}, + my $solver = PublicInbox::SolverGit->new($ctx->{ibx}, \&solve_result, $ctx); # PSGI server will call this immediately and give us a callback (-wcb) sub {