passover method implemented
authortbrannon <tbrannon@devel.cybertechnologyllc.com>
Fri, 9 Jan 2009 19:00:24 +0000 (14:00 -0500)
committertbrannon <tbrannon@devel.cybertechnologyllc.com>
Fri, 9 Jan 2009 19:00:24 +0000 (14:00 -0500)
lib/HTML/Element/Library.pm

index 8f888b5c321384c8cc84a32c52563ff0e82602ce..523c2111b8cc3987f0bf5a12000bf61dfd5666bd 100644 (file)
@@ -24,7 +24,7 @@ our @EXPORT      = qw();
 
 
 
-our $VERSION = '3.51';
+our $VERSION = '3.53';
 
 
 # Preloaded methods go here.
@@ -36,6 +36,33 @@ sub HTML::Element::siblings {
   $p->content_list;
 }
 
+sub HTML::Element::passover {
+  my ($tree, $child_id) = @_;
+  
+  #warn "ARGS:   my ($tree, $child)";
+
+  my $exodus = $tree->look_down(id => $child_id);
+
+  my @s = HTML::Element::siblings($exodus);
+
+  warn "sibling count", scalar @s;
+  warn "siblings", join ':', @s;
+
+  for my $s (@s) {
+    warn "SIBLING: $s";
+    warn "ref sib", ref $s;
+    next unless ref $s;
+    if ($s->attr('id') eq $child_id) {
+      ;
+    } else {
+      $s->delete;
+    }
+  }
+
+  return $exodus; # Goodbye Egypt! http://en.wikipedia.org/wiki/Passover
+
+}
+
 sub HTML::Element::sibdex {
 
   my $element = shift;
This page took 0.010926 seconds and 4 git commands to generate.