bugfix to Siesta::List::set_plugins

[prev] [thread] [next] [lurker] [Date index for 2003/08/01]

From: Jody Belka
Subject: bugfix to Siesta::List::set_plugins
Date: 16:59 on 01 Aug 2003
the set_plugins routine wasn't looking at just the plugins for the
specified queue, thereby causing all sorts of fun and games. here's a
unified diff of a fix that seems to work (with my minimal knowledge of
siesta)

Jody




--- List.pm     2003-08-01 16:28:13.000000000 +0100
+++ /home/belkajm/List.pm       2003-08-01 16:39:10.000000000 +0100
@@ -1,4 +1,4 @@
-# $Id: List.pm 1248 2003-07-23 13:27:39Z simon $
+# $Id$
 use strict;
 package Siesta::List;
 use UNIVERSAL::require;
@@ -212,12 +212,12 @@
     die "'$queue' doesn't look like an queue id" unless $queue =~
/^[a-z]+$/;

     # first, delete the plugins that don't exist in the new order
-    for ($self->plugins($queue)) {
+    for ($self->_plugins) {
         $_->delete unless $new_rank{ $_->name };
     }

     # then just add new ones
-    my %old = map { $_->name => 1 } $self->plugins($queue);
+    my %old = map { $_->name => 1 } $self->_plugins;
     for my $plugin (keys %new_rank) {
                my $personal = ($plugin =~ s/^\+//);
         next if $old{ $plugin };
@@ -230,7 +230,7 @@
     }

     # and reorder all of them
-    for ($self->plugins($queue)) {
+    for ($self->_plugins) {
         $_->rank( $new_rank{ $_->name } );
         $_->update;
     }



Generated at 13:56 on 01 Jul 2004 by mariachi 0.52