introspection bug fix for a single method lookup
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 25 Feb 2005 21:23:06 +0000 (21:23 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 25 Feb 2005 21:23:06 +0000 (21:23 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@118 9efc2488-bf62-4759-914b-345cdb29e865

src/perlmods/OpenSRF/Application.pm

index f818b54..0205c2f 100644 (file)
@@ -401,11 +401,11 @@ sub introspect {
 
        $method = undef if ($self->{api_name} =~ /all$/o);
 
-       for my $api_level ( 1 .. $#_METHODS ) {
+       for my $api_level ( reverse(1 .. $#_METHODS) ) {
                for my $api_name ( sort keys %{$_METHODS[$api_level]} ) {
                        if (!$_METHODS[$api_level]{$api_name}{remote}) {
                                if (defined($method)) {
-                                       if ($api_name =~ /$method/) {
+                                       if ($api_name eq $method) {
                                                $client->respond( $_METHODS[$api_level]{$api_name} );
                                        }
                                } else {