about summary refs log tree commit homepage
path: root/lib/PublicInbox/Mbox.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/Mbox.pm')
-rw-r--r--lib/PublicInbox/Mbox.pm11
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 {