Mercurial > pidgin
annotate libpurple/plugins/perl/scripts/function_list.pl @ 22793:2ff3eb79078d
Change the "Screen name" text to "Username" per a number of discussions on
the mailing lists, IRC, and XMPP. This will truly come to fruition when
we merge im.pidgin.pidgin.next.minor back here, gaining us the help text
in the entry area.
| author | John Bailey <rekkanoryo@rekkanoryo.org> |
|---|---|
| date | Wed, 30 Apr 2008 06:02:26 +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 } |
