diff options
author | Eric Wong <e@80x24.org> | 2019-06-24 02:52:29 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-06-24 05:26:26 +0000 |
commit | 8e1c3155da4edc082e8e3d8b30351f0c861757a7 (patch) | |
tree | 255a1c9ddb68b8c2ece212adc4ad1df677bec4c0 /lib/PublicInbox/DS.pm | |
parent | 2600289573c569fea65a1da817497414175bae55 (diff) | |
download | public-inbox-8e1c3155da4edc082e8e3d8b30351f0c861757a7.tar.gz |
We can reduce the amount of short-lived anonymous subs we create by passing $self to code references.
Diffstat (limited to 'lib/PublicInbox/DS.pm')
-rw-r--r-- | lib/PublicInbox/DS.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm index 482710f7..7b87cd56 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -468,7 +468,7 @@ next_buf: } } else { #($ref eq 'CODE') { shift @$wbuf; - $bref->(); + $bref->($self); } } # while @$wbuf @@ -535,7 +535,7 @@ sub write { } return 0; } elsif ($ref eq 'CODE') { - $bref->(); + $bref->($self); return 1; } else { my $to_write = bytes::length($$bref); |