From 55398d96968ca129b0229f6087aa9bc393a881a4 Mon Sep 17 00:00:00 2001 From: Gustavo De Nardin Date: Fri, 23 Mar 2007 21:16:46 +0000 Subject: optimize next call to _get_section(), without using memoize evilness --- lib/Youri/Repository/Mandriva_upload.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Youri/Repository/Mandriva_upload.pm b/lib/Youri/Repository/Mandriva_upload.pm index ae7581a..bfc4935 100644 --- a/lib/Youri/Repository/Mandriva_upload.pm +++ b/lib/Youri/Repository/Mandriva_upload.pm @@ -342,6 +342,10 @@ sub _get_section { print STDERR "Can't guess destination: section missing, defaulting to contrib/release\n" unless $section; $section ||= 'contrib/release'; + + # next time we don't need to search everything again + $self->{packages}{$file}{section} = $section; + return $section; } -- cgit v1.2.1