PApp::Package - Application Package Class.
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.
config([key])
Examples:
my $path = $ppkg->config("path");
my $cfg = $ppkg->config; my $path = $cfg{path};
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.
refer
's a callback (see PApp::Callback::refer) defined
using the callback element on the package level and returns the resulting
coderef.
gen_lexical($value)
$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.
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.
You can (currently) access packages embedded in another module using the $ppkg->{pkg}{packagename} syntax.
This API might not be stable.
Marc Lehmann <pcg@goof.com> http://www.goof.com/pcg/marc/