From ce37886fb8ec1f0e2749b500f1774cadb8343e2c Mon Sep 17 00:00:00 2001 From: mellor Date: Mon, 23 Nov 2009 16:32:22 +0000 Subject: [PATCH] removed dup copy of scan_plugins subroutine I left in by mistake git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4653 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Client.pm | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index f7bf96586..8ea5a5d4b 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -192,39 +192,6 @@ sub submit_request { # NOTE: This is copied from xcatd (last merge 11/23/09). # TODO: Will eventually move to using common source.... ################################### -sub scan_plugins { - my @plugins=glob($plugins_dir."/*.pm"); - foreach (@plugins) { - /.*\/([^\/]*).pm$/; - my $modname = $1; - unless (eval { require "$_" }) { - print "Error loading module $_ ...skipping\n"; - next; - } - no strict 'refs'; - my $cmd_adds=${"xCAT_plugin::".$modname."::"}{handled_commands}->(); - foreach (keys %$cmd_adds) { - my $value = $_; - if (defined($cmd_handlers{$_})) { - my $add=1; - #This next bit of code iterates through the handlers. - #If the value doesn't contain an equal, and has an equivalent entry added by - # another plugin already, don't add (otherwise would hit the DB multiple times) - # a better idea, restructure the cmd_handlers as a multi-level hash - # prove out this idea real quick before doing that - foreach (@{$cmd_handlers{$_}}) { - if (($_->[1] eq $cmd_adds->{$value}) and (($cmd_adds->{$value} !~ /=/) or ($_->[0] eq $modname))) { - $add = 0; - } - } - if ($add) { push @{$cmd_handlers{$_}},[$modname,$cmd_adds->{$_}]; } - #die "Conflicting handler information from $modname"; - } else { - $cmd_handlers{$_} = [ [$modname,$cmd_adds->{$_}] ]; - } - } - } -} sub scan_plugins { my @plugins=glob($plugins_dir."/*.pm"); foreach (@plugins) {