[interchange-cvs] interchange - jon modified lib/Vend/Dispatch.pm

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Thu Dec 7 18:15:58 EST 2006


User:      jon
Date:      2006-12-07 23:15:58 GMT
Modified:  lib/Vend Tag: STABLE_5_4-branch Dispatch.pm
Log:
Work around apparent Perl bug that allowed code called by DispatchRoutines
to overwrite the routines arrays themselves.

Found and fixed by Frederic Steinfels <fredo at dvdupgrades.ch>. Backported
from trunk lib/Vend/Dispatch.pm version 1.63.

Revision  Changes    Path
No                   revision



No                   revision



1.60.2.2  +4 -6      interchange/lib/Vend/Dispatch.pm


rev 1.60.2.2, prev_rev 1.60.2.1
Index: Dispatch.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Dispatch.pm,v
retrieving revision 1.60.2.1
retrieving revision 1.60.2.2
diff -u -u -r1.60.2.1 -r1.60.2.2
--- Dispatch.pm	7 Dec 2006 23:10:09 -0000	1.60.2.1
+++ Dispatch.pm	7 Dec 2006 23:15:58 -0000	1.60.2.2
@@ -1,6 +1,6 @@
 # Vend::Dispatch - Handle Interchange page requests
 #
-# $Id: Dispatch.pm,v 1.60.2.1 2006/12/07 23:10:09 jon Exp $
+# $Id: Dispatch.pm,v 1.60.2.2 2006/12/07 23:15:58 jon Exp $
 #
 # Copyright (C) 2002-2005 Interchange Development Group
 # Copyright (C) 2002 Mike Heins <mike at perusion.net>
@@ -26,7 +26,7 @@
 package Vend::Dispatch;
 
 use vars qw($VERSION);
-$VERSION = substr(q$Revision: 1.60.2.1 $, 10);
+$VERSION = substr(q$Revision: 1.60.2.2 $, 10);
 
 use POSIX qw(strftime);
 use Vend::Util;
@@ -1457,10 +1457,8 @@
 	}
 # END LEGACY
 
-	if(my $ary = $Vend::Cfg->{DispatchRoutines}) {
-		for(@$ary) {
-			$_->();
-		}
+	for my $routine (@{$Vend::Cfg->{DispatchRoutines}}) {
+		$routine->();
 	}
 
 #show_times("end dispatch routines (Autoload, etc.)") if $Global::ShowTimes;








More information about the interchange-cvs mailing list