Padre::Current - convenient access to current objects within Padre
my $main = Padre::Current->main; ...
Padre uses lots of objects from different classes. And one needs to have access to the current object of this sort or this other to do whatever is need at the time.
Instead of poking directly with the various classes to find the object you need, Padre::Current provides a bunch of handy methods to retrieve whatever current object you need.
Padre::Current
Create and return a Padre::Current object. No params.
Note that you don't need to use an object directly to call those methods, calling them as class methods is ok. For example:
my $doc = Padre::Current->document;
Here's the list of methods provided to get access to current something:
Return the current Padre::Config object from the main window.
Padre::Config
Return the current Padre::Document object in use.
Padre::Document
Return the current Padre::Editor object in use.
Padre::Editor
Return the filename of the current opened document.
Return the current Padre object in use.
Padre
Return the current Padre::Wx::Main object in use.
Padre::Wx::Main
Return the current Padre::Wx::Notebook object in use.
Padre::Wx::Notebook
Return the current Padre::Project object in use.
Padre::Project
Return the current selected text.
Return the title of current editor window.
Copyright 2008-2009 The Padre development team as listed in Padre.pm.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
To install Padre, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Padre
CPAN shell
perl -MCPAN -e shell install Padre
For more information on module installation, please visit the detailed CPAN module installation guide.