diff options
author | Gianni Ceccarelli <dakkar@dechirico.(none)> | 2009-04-21 15:50:39 +0200 |
---|---|---|
committer | Gianni Ceccarelli <dakkar@dechirico.(none)> | 2009-04-21 15:50:39 +0200 |
commit | 6ab176ee34c6b0b7e2e1e85dde5bafcd76cb7e93 (patch) | |
tree | 77f51432877d1f316eb65caeea122063627ab6f3 /lib/Tree/Template/Declare.pm | |
parent | docs, and changed the export-munging methods for builders (diff) | |
download | Tree-Template-Declare-6ab176ee34c6b0b7e2e1e85dde5bafcd76cb7e93.tar.gz Tree-Template-Declare-6ab176ee34c6b0b7e2e1e85dde5bafcd76cb7e93.tar.bz2 Tree-Template-Declare-6ab176ee34c6b0b7e2e1e85dde5bafcd76cb7e93.zip |
added text nodes to XML
Diffstat (limited to 'lib/Tree/Template/Declare.pm')
-rw-r--r-- | lib/Tree/Template/Declare.pm | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/lib/Tree/Template/Declare.pm b/lib/Tree/Template/Declare.pm index 1c4a53a..118fcea 100644 --- a/lib/Tree/Template/Declare.pm +++ b/lib/Tree/Template/Declare.pm @@ -80,7 +80,7 @@ sub _build_group { }, }; if ($builder->can('_munge_exports')) { - return $builder->_munge_exports($normal_exports); + return $builder->_munge_exports($normal_exports,\@current_node); } else { return $normal_exports; @@ -207,10 +207,24 @@ adds the second node at the end of the children list of the first node =back The builder can also implement an C<_munge_exports> method. If it -does, C<_munge_exports> will be called with a hash ref consisting of -the methods that C<Tree::Template::Declare> wants to export, and it -should return a hash ref with the methods that will actually be -exported. +does, C<_munge_exports> will be called with: + +=over 4 + +=item * + +a hash ref consisting of the functions that C<Tree::Template::Declare> +wants to export, + +=item * + +an array ref, whose first element will be the current node whenever +the user calls an exported function + +=back + +C<_munge_exports> should return a hash ref with the functions that +will actually be exported. See L<Sub::Exporter>, in particular the section on group builders, for details. See L<Tree::Template::Declare::HTML_Element> and |