Mon, 03 Feb 2014 22:40:31 +0530
Swap @title and @short_description roles
|
16642
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
1 | $MODULE_NAME = "List all Purple:: (and Pidgin::) functions"; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
2 | use Purple; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
3 | # Uncomment this to print the Pidgin:: functions as well. |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
4 | #use Pidgin; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
5 | |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
6 | # All the information Purple gets about our nifty plugin |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
7 | %PLUGIN_INFO = ( |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
8 | perl_api_version => 2, |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
9 | name => "Perl: $MODULE_NAME", |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
10 | version => "0.1", |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
11 | summary => "Print to standard output all the functions under the Purple:: (and Pidgin::) packages", |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
12 | description => "Print to standard output all the functions under the Purple:: (and Pidgin::) packages", |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
13 | author => "Etan Reisner <deryni\@gmail.com>", |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
14 | url => "http://sourceforge.net/users/deryni9/", |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
15 | id => "functionlist", |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
16 | |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
17 | load => "plugin_load", |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
18 | unload => "plugin_unload" |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
19 | ); |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
20 | |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
21 | sub plugin_init { |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
22 | return %PLUGIN_INFO; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
23 | } |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
24 | |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
25 | sub print_array { |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
26 | my $array = shift; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
27 | |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
28 | my @arr = sort @$array; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
29 | foreach $mod (@arr) { |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
30 | my @sub; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
31 | |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
32 | foreach $key (sort keys %{$mod}) { |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
33 | if ($key =~ /::$/) { |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
34 | push @sub, "$mod$key"; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
35 | } else { |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
36 | print "$mod$key\n"; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
37 | } |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
38 | } |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
39 | print_array(\@sub); |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
40 | } |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
41 | } |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
42 | |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
43 | sub plugin_load { |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
44 | my $plugin = shift; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
45 | my @purplearray; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
46 | my @pidginarray; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
47 | |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
48 | foreach $key (sort keys %Purple::) { |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
49 | if ($key =~ /::$/) { |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
50 | push @purplearray, "Purple::$key"; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
51 | } else { |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
52 | print "Purple::$key\n"; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
53 | } |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
54 | } |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
55 | print_array(\@purplearray); |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
56 | |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
57 | foreach $key (sort keys %Pidgin::) { |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
58 | if ($key =~ /::$/) { |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
59 | push @pidginarray, "Pidgin::$key"; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
60 | } else { |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
61 | print "Pidgin::$key\n"; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
62 | } |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
63 | } |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
64 | print_array(\@pidginarray); |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
65 | } |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
66 | |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
67 | sub plugin_unload { |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
68 | my $plugin = shift; |
|
4db1a47080f2
Add a script I've found handy to make sure the perl APIs look right, it also
Etan Reisner <deryni@pidgin.im>
parents:
diff
changeset
|
69 | } |