diff options
author | Eric Wong <e@80x24.org> | 2015-09-30 21:00:19 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-09-30 21:09:18 +0000 |
commit | 709a1979302ef5dbb40babb84821b079868490a1 (patch) | |
tree | d38f9785c0ffebc1f36e3d7916ca75467e2fe8e9 /lib/PublicInbox/Mbox.pm | |
parent | ebf564bad83e0c160b5088c7aaa9862d47735226 (diff) | |
download | public-inbox-709a1979302ef5dbb40babb84821b079868490a1.tar.gz |
It doesn't actually give performance improvements unless we use types with "my", but we don't do that. We'll only continue using fields with Danga::Socket-derived classes where they're required.
Diffstat (limited to 'lib/PublicInbox/Mbox.pm')
-rw-r--r-- | lib/PublicInbox/Mbox.pm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/PublicInbox/Mbox.pm b/lib/PublicInbox/Mbox.pm index c92d4447..8bb8dc83 100644 --- a/lib/PublicInbox/Mbox.pm +++ b/lib/PublicInbox/Mbox.pm @@ -110,16 +110,15 @@ EOF package PublicInbox::MboxGz; use strict; use warnings; -use fields qw(gz fh buf); sub new { my ($class, $fh) = @_; - my $self = fields::new($class); my $buf; - $self->{buf} = \$buf; - $self->{gz} = IO::Compress::Gzip->new(\$buf); - $self->{fh} = $fh; - $self; + bless { + buf => \$buf, + gz => IO::Compress::Gzip->new(\$buf), + fh => $fh, + }, $class; } sub _flush_buf { |