1Padre::PluginManager(3)User Contributed Perl DocumentatioPnadre::PluginManager(3)
2
3
4

NAME

6       Padre::PluginManager - Padre plug-in manager
7

DESCRIPTION

9       The "PluginManager" class contains logic for locating and loading Padre
10       plug-ins, as well as providing part of the interface to plug-in
11       writers.
12

METHODS

14   "new"
15       The constructor returns a new "Padre::PluginManager" object, but you
16       should normally access it via the main Padre object:
17
18         my $manager = Padre->ide->plugin_manager;
19
20       First argument should be a Padre object.
21
22   "parent"
23       Stores a reference back to the parent IDE object.
24
25   "plugin_dir"
26       Returns the user plug-in directory (below the Padre configuration
27       directory).  This directory was added to the @INC module search path.
28
29   "plugins"
30       Returns a hash (reference) of plug-in names associated with a
31       Padre::PluginHandle.
32
33       This hash is only populated after "load_plugins()" was called.
34
35   "plugins_with_context_menu"
36       Returns a hash (reference) with the names of all plug-ins as keys which
37       define a hook for the context menu.
38
39       See Padre::Plugin.
40
41   "main"
42       A convenience method to get to the main window.
43
44   "load_plugins"
45       Scans for new plug-ins in the user plug-in directory, in @INC, and in
46       .par files in the user plug-in directory.
47
48       Loads any given module only once, i.e. does not refresh if the plug-in
49       has changed while Padre was running.
50
51   "reload_plugins"
52       For all registered plug-ins, unload them if they were loaded and then
53       reload them.
54
55   "alert_new"
56       The "alert_new" method is called by the main window post-initialisation
57       and checks for new plug-ins. If any are found, it presents a message to
58       the user.
59
60   "failed"
61       Returns the plug-in names (without "Padre::Plugin::" prefixed) of all
62       plug-ins that the editor attempted to load but failed. Note that after
63       a failed attempt, the plug-in is usually disabled in the configuration
64       and not loaded again when the editor is restarted.
65
66   "load_plugin"
67       Given a plug-in name such as "Foo" (the part after "Padre::Plugin"),
68       load the corresponding module, enable the plug-in and update the Plug-
69       ins menu, etc.
70
71   "unload_plugin"
72       Given a plug-in name such as "Foo" (the part after "Padre::Plugin"),
73       disable the plug-in, unload the corresponding module, and update the
74       Plug-ins menu, etc.
75
76   "reload_plugin"
77       Reload a single plug-in whose name (without "Padre::Plugin::") is
78       passed in as first argument.
79
80   "plugin_db"
81       Given a plug-in name or namespace, returns a hash reference which
82       corresponds to the configuration section in the Padre database of that
83       plug-in. Any modifications of that hash reference will, on normal exit,
84       be serialized and written back to the database file.
85
86       If the plug-in name is omitted and this method is called from a plug-in
87       namespace, the plug-in name is determine automatically.
88
89   "reload_current_plugin"
90       When developing a plug-in one usually edits the files belonging to the
91       plug-in (The "Padre::Plugin::Wonder" itself or
92       "Padre::Documents::Wonder" located in the same project as the plug-in
93       itself.
94
95       This call and the appropriate menu option should be able to load (or
96       reload) that plug-in.
97
98   "on_context_menu"
99       Called by "Padre::Wx::Editor" when a context menu is about to be
100       displayed. The method calls the context menu hooks in all plug-ins that
101       have one for plug-in specific manipulation of the context menu.
102

SEE ALSO

104       Padre, Padre::Config
105
107       Copyright 2008-2010 The Padre development team as listed in Padre.pm.
108

LICENSE

110       This program is free software; you can redistribute it and/or modify it
111       under the same terms as Perl 5 itself.
112
113
114
115perl v5.12.1                      2010-06-11           Padre::PluginManager(3)
Impressum