]> iEval git - html-element-library.git/commitdiff
optionally return tree
authorTerrence Brannon <TBrannon@SmartFinancial.com>
Tue, 17 Mar 2009 12:39:48 +0000 (08:39 -0400)
committerTerrence Brannon <TBrannon@SmartFinancial.com>
Tue, 17 Mar 2009 12:39:48 +0000 (08:39 -0400)
lib/HTML/Element/Library.pm

index bc85c9dca1598691f6d5ec2b9ec6f125fcdeb1ea..4c2d8793da93fa49dabc1c98df05aad4b09d621a 100644 (file)
@@ -34,7 +34,7 @@ our $VERSION = '3.53';
 # https://rt.cpan.org/Ticket/Display.html?id=44105
 sub HTML::Element::fillinform {
 
-    my ($tree, $hashref)=@_;
+    my ($tree, $hashref, $return_tree)=@_;
 
     (ref $hashref) eq 'HASH' or die 'hashref not supplied as argument' ;
 
@@ -42,6 +42,12 @@ sub HTML::Element::fillinform {
     my $html = $tree->as_HTML;
     my $new_html = HTML::FillInForm->fill(\$html, $hashref);
 
+    if ($return_tree) {
+       HTML::TreeBuilder->new_from_content($new_html);
+    } else {
+       $new_html;
+    }
+
 }
 
 sub HTML::Element::siblings {
This page took 0.022863 seconds and 4 git commands to generate.