Mercurial > pidgin
annotate libpurple/plugins/perl/scripts/function_list.pl @ 27078:0d01bd0c19ba
Use the JID for adding a chat/buddy because the name is for descriptive
purpose only, and using it will not fill in the Add Chat dialog correctly.
Because the JID is not visible, the user will not know what to actually put
there instead.
| author | Elliott Sales de Andrade <qulogic@pidgin.im> |
|---|---|
| date | Mon, 08 Jun 2009 02:24:49 +0000 |
| parents | fab49a6e9b25 |
| children |
| rev | line source |
|---|---|
|
16573
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
1 $MODULE_NAME = "List all Purple:: (and Pidgin::) functions"; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
2 use Purple; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
3 # Uncomment this to print the Pidgin:: functions as well. |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
4 #use Pidgin; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
5 |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
6 # All the information Purple gets about our nifty plugin |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
7 %PLUGIN_INFO = ( |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
8 perl_api_version => 2, |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
9 name => "Perl: $MODULE_NAME", |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
10 version => "0.1", |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
11 summary => "Print to standard output all the functions under the Purple:: (and Pidgin::) packages", |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
12 description => "Print to standard output all the functions under the Purple:: (and Pidgin::) packages", |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
13 author => "Etan Reisner <deryni\@gmail.com>", |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
14 url => "http://sourceforge.net/users/deryni9/", |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
15 id => "functionlist", |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
16 |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
17 load => "plugin_load", |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
18 unload => "plugin_unload" |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
19 ); |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
20 |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
21 sub plugin_init { |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
22 return %PLUGIN_INFO; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
23 } |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
24 |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
25 sub print_array { |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
26 my $array = shift; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
27 |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
28 my @arr = sort @$array; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
29 foreach $mod (@arr) { |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
30 my @sub; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
31 |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
32 foreach $key (sort keys %{$mod}) { |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
33 if ($key =~ /::$/) { |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
34 push @sub, "$mod$key"; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
35 } else { |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
36 print "$mod$key\n"; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
37 } |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
38 } |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
39 print_array(\@sub); |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
40 } |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
41 } |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
42 |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
43 sub plugin_load { |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
44 my $plugin = shift; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
45 my @purplearray; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
46 my @pidginarray; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
47 |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
48 foreach $key (sort keys %Purple::) { |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
49 if ($key =~ /::$/) { |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
50 push @purplearray, "Purple::$key"; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
51 } else { |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
52 print "Purple::$key\n"; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
53 } |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
54 } |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
55 print_array(\@purplearray); |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
56 |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
57 foreach $key (sort keys %Pidgin::) { |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
58 if ($key =~ /::$/) { |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
59 push @pidginarray, "Pidgin::$key"; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
60 } else { |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
61 print "Pidgin::$key\n"; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
62 } |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
63 } |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
64 print_array(\@pidginarray); |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
65 } |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
66 |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
67 sub plugin_unload { |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
68 my $plugin = shift; |
|
fab49a6e9b25
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <pidgin@unreliablesource.net>
parents:
diff
changeset
|
69 } |
