X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FDS.pm;h=da68802dda94a82da154e156207442b4641bdd99;hb=94096cab6cd5e00c8a36a4a2667bdb9acf43d01f;hp=aa65b2d364259d97003f3c4b83b79b301c4003f7;hpb=358f61264330da1e510c07868372c02dfa8f6b2c;p=public-inbox.git diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm index aa65b2d3..da68802d 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -13,6 +13,12 @@ # Bugs encountered were reported to bug-Danga-Socket@rt.cpan.org, # fixed in Danga::Socket 1.62 and visible at: # https://rt.cpan.org/Public/Dist/Display.html?Name=Danga-Socket +# +# fields: +# sock: underlying socket +# rbuf: scalarref, usually undef +# wbuf: arrayref of coderefs or tmpio (autovivified)) +# (tmpio = [ GLOB, offset, [ length ] ]) package PublicInbox::DS; use strict; use bytes; @@ -22,19 +28,10 @@ use Fcntl qw(SEEK_SET :DEFAULT O_APPEND); use Time::HiRes qw(clock_gettime CLOCK_MONOTONIC); use parent qw(Exporter); our @EXPORT_OK = qw(now msg_more); -use warnings; use 5.010_001; use Scalar::Util qw(blessed); - use PublicInbox::Syscall qw(:epoll); use PublicInbox::Tmpfile; - -use fields ('sock', # underlying socket - 'rbuf', # scalarref, usually undef - 'wbuf', # arrayref of coderefs or tmpio (autovivified)) - # (tmpio = [ GLOB, offset, [ length ] ]) - ); - use Errno qw(EAGAIN EINVAL); use Carp qw(confess carp); @@ -328,8 +325,6 @@ This is normally (always?) called from your subclass via: =cut sub new { my ($self, $sock, $ev) = @_; - $self = fields::new($self) unless ref $self; - $self->{sock} = $sock; my $fd = fileno($sock);