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/NewsGroup.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/NewsGroup.pm')
-rw-r--r-- | lib/PublicInbox/NewsGroup.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/PublicInbox/NewsGroup.pm b/lib/PublicInbox/NewsGroup.pm index 0c7051db..1250b0d8 100644 --- a/lib/PublicInbox/NewsGroup.pm +++ b/lib/PublicInbox/NewsGroup.pm @@ -3,7 +3,6 @@ package PublicInbox::NewsGroup; use strict; use warnings; -use fields qw(name git_dir address domain mm gcf search); use Scalar::Util qw(weaken); require Danga::Socket; require PublicInbox::Msgmap; @@ -11,12 +10,13 @@ require PublicInbox::GitCatFile; sub new { my ($class, $name, $git_dir, $address) = @_; - my $self = fields::new($class); - $self->{name} = $name; $address = $address->[0] if ref($address); + my $self = bless { + name => $name, + git_dir => $git_dir, + address => $address, + }, $class; $self->{domain} = ($address =~ /\@(\S+)\z/) ? $1 : 'localhost'; - $self->{git_dir} = $git_dir; - $self->{address} = $address; $self; } |