From 6d33c3a7453e6b13057cda116d3dadd52d4bcd0b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 25 Aug 2009 17:11:59 +0100 Subject: [PATCH] Saner sourcebasedir function --- yarrg/CommodsWeb.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/yarrg/CommodsWeb.pm b/yarrg/CommodsWeb.pm index 84ea710..1eae15e 100644 --- a/yarrg/CommodsWeb.pm +++ b/yarrg/CommodsWeb.pm @@ -62,12 +62,10 @@ sub sourcebasedir () { for my $dir (@INC) { if ($dir =~ m/\.perl-lib$/) { - $dir= "$dir/.."; - last; + return "$dir/.."; } } - defined $dir or - die "no source base dir in @INC"; + die "no source base dir in @INC"; return $dir; } -- 2.30.2