/[cvs]/joko/Scripts/psh/lib/RPC/XML/listMethods.xpl
ViewVC logotype

Contents of /joko/Scripts/psh/lib/RPC/XML/listMethods.xpl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Fri Jun 14 21:22:12 2002 UTC (22 years, 3 months ago) by cvsjoko
Branch: nfo, MAIN
CVS Tags: r001, HEAD
Changes since 1.1: +0 -0 lines
first import

1 <?xml version="1.0"?>
2 <!DOCTYPE methoddef SYSTEM "rpc-method.dtd">
3 <!--
4 Generated automatically by etc\make_method v1.09, Fri May 31 04:39:51 2002
5
6 Any changes made here will be lost.
7 -->
8 <methoddef>
9 <name>system.listMethods</name>
10 <version>1.1</version>
11 <signature>array</signature>
12 <signature>array string</signature>
13 <help>
14 List all the methods known to the server. If the STRING parameter is passed,
15 it is used as a substring to match against, with only those matching methods
16 being returned. Note that the STRING parameter is not a regular expression,
17 but rather just a simple substring.
18 </help>
19 <code language="perl">
20 <![CDATA[
21 #!perl
22 ###############################################################################
23 #
24 # Sub Name: listMethods
25 #
26 # Description: Read the current list of methods from the server object
27 # and return the names in a list reference.
28 #
29 # Arguments: NAME IN/OUT TYPE DESCRIPTION
30 # $srv in ref Server object instance
31 # $pat in scalar If passed, a substring to match
32 # names against. NOT a regex!
33 #
34 # Globals: None.
35 #
36 # Environment: None.
37 #
38 # Returns: listref
39 #
40 ###############################################################################
41 sub listMethods
42 {
43 use strict;
44
45 my $srv = shift;
46 my $pat = shift;
47
48 my @list = sort $srv->list_methods;
49
50 # Exclude any that are hidden from introspection APIs
51 @list = grep(! $srv->get_method($_)->hidden, @list);
52 @list = grep(index($_, $pat) != -1, @list) if ($pat);
53
54 \@list;
55 }
56
57 __END__
58 ]]></code>
59 </methoddef>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed