PApp::Package - Application Package Class.
# not normally "use"d in application code.
Every application in PApp is represented as a PApp::Package (currently this also defines a unique namespace). This Module defines the PApp::Package and PApp::Module classes.
PApp::Package
PApp::Module
Returns a hash-ref (no options) with the current configuration information, or a specific configuration value for the current application.
Examples:
my $path = $ppkg->config("path"); my $cfg = $ppkg->config; my $path = $cfg{path};
Run a sub for all packages in a papp.
Load a PApp::XSLT stylesheet of type $type (either pxml (default unless guessed by the extension) or xml and language $lang into the package and return it. It is planned to do some caching in the future.
pxml
xml
$lang
This method refer's a callback (see PApp::Callback::refer) defined using the callback element on the package level and returns the resulting coderef.
refer
(internal). Generate a new lexical to be used in compilation and return it's name (including '$').
Insert the given package at the current position, optionally setting the default module to $module and $PApp::curconf to $conf. If no name is given (or $name is undef), the package will be embedded under it's "natural" name, otherwise the given name is used to differentiate between different instances of the same package.
$module
$PApp::curconf
$conf
The PApp namespace (i.e. <%S> and <%A>) will be shared with the inserted package.
You can (currently) access packages embedded in another module using the $ppkg->{pkg}{packagename} syntax.
This API might not be stable.
Embed the given package. This function is identical to the insert method above with the exception of the namespace (eg. %S) , which will NOT be shared with the embedding package.
PApp.
Marc Lehmann <schmorp@schmorp.de> http://home.schmorp.de/
To install PApp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PApp
CPAN shell
perl -MCPAN -e shell install PApp
For more information on module installation, please visit the detailed CPAN module installation guide.