From ed53ecda0546d6c639fa3d227a59ace4d57b81a5 Mon Sep 17 00:00:00 2001 From: Upasana Date: Mon, 5 Mar 2018 00:58:41 +0100 Subject: Bug 1273381 - Improve bugzilla object performance by using Class::XSAccessor for object accessors --- Bugzilla/Milestone.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Milestone.pm') diff --git a/Bugzilla/Milestone.pm b/Bugzilla/Milestone.pm index 2f10e1f00..078074dc4 100644 --- a/Bugzilla/Milestone.pm +++ b/Bugzilla/Milestone.pm @@ -227,7 +227,13 @@ sub bug_count { ##### Accessors ###### ################################ -sub name { return $_[0]->{'value'}; } +use Class::XSAccessor { + accessors => { + id => __PACKAGE__->ID_FIELD, + name => __PACKAGE__->NAME_FIELD, + }, +}; + sub product_id { return $_[0]->{'product_id'}; } sub sortkey { return $_[0]->{'sortkey'}; } sub is_active { return $_[0]->{'isactive'}; } -- cgit v1.2.3-24-g4f1b