[BACK]Return to patch-lightparser_pl CVS log [TXT][DIR] Up to [local] / ports / www / lightsquid / patches

File: [local] / ports / www / lightsquid / patches / Attic / patch-lightparser_pl (download)

Revision 1.1, Thu Mar 12 19:44:59 2009 UTC (15 years, 3 months ago) by yason
Branch: MAIN

perl 5.10 compatibility patch from upstream

$OpenBSD$
--- lightparser.pl.orig	Wed Jan 10 13:06:49 2007
+++ lightparser.pl	Thu Mar 12 22:43:03 2009
@@ -246,10 +246,13 @@ while (<FF>) {
     $url =~ s/([a-z]+:\/\/)??.*\.(rapidshare\.com)/$1www.$2/o;
 
     #extract site name
-    $url =~ m/([a-z]+:\/\/)??([a-z0-9\-]+\.){1}(([a-z0-9\-]+\.){0,})([a-z0-9\-]+){1}(:[0-9]+)?\/(.*)/o;
-    $site=$2.$3.$5;
-    
-    $site=$Lurl if ($site eq "");
+    if ($url =~ m/([a-z]+:\/\/)??([a-z0-9\-]+\.){1}(([a-z0-9\-]+\.){0,})([a-z0-9\-]+){1}(:[0-9]+)?\/(.*)/o) {
+       $site=$2.$3.$5;
+    } else {
+       $site=$Lurl;
+    }
+
+ESL 2008-11
 
     $totalsize    {$user}       +=$Lsize;
     $totalhit     {$user}       ++;