From 709a1979302ef5dbb40babb84821b079868490a1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 30 Sep 2015 21:00:19 +0000 Subject: remove unnecessary fields usage 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. --- lib/PublicInbox/Mbox.pm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/PublicInbox/Mbox.pm') 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 { -- cgit v1.2.3-24-ge0c7