mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 16:46:26 +00:00
990f06577a
XMLterm changes only. Added a coupled of pagelet test scripts.
35 lines
1.2 KiB
Perl
Executable File
35 lines
1.2 KiB
Perl
Executable File
#!/usr/bin/perl
|
|
# Usage: xrpchelp <server-URL> [<method-name>]
|
|
|
|
use Frontier::Client;
|
|
|
|
die "Usage: xrpchelp <server-URL> [<method-name>]\n"
|
|
unless (@ARGV == 1) or (@ARGV == 2);
|
|
|
|
my $url = shift @ARGV; # XML-RPC server URL
|
|
|
|
$server = Frontier::Client->new( 'url' => $url, 'debug' => 0 );
|
|
|
|
my $cookie = $ENV{LTERM_COOKIE}; # Cookie for security
|
|
print "\e{S$cookie\012"; # Escape sequence for start of HTML
|
|
|
|
if (@ARGV) { # Print help string for method
|
|
|
|
print $server->call("system.methodHelp", @ARGV), "\n"; # Print method help
|
|
|
|
} else { # List all method names
|
|
|
|
my $list = $server->call("system.listMethods", @ARGV); # Get method names
|
|
|
|
print "<OL>\n"; # Ordered list start tag
|
|
|
|
foreach $method (@$list) { # For each method name, add list element
|
|
print qq%<LI><SPAN CLASS='textlink' onClick="return HandleEvent(event,
|
|
'click','sendln',-\#,'xrpchelp $url $method')">$method</SPAN>\n%;
|
|
}
|
|
|
|
print "</OL>\n"; # Ordered list end tag
|
|
}
|
|
|
|
print "\000"; # Escape sequence for end of HTML
|