From: John Napiorkowski Date: Sat, 25 Sep 2010 00:04:45 +0000 (-0400) Subject: starting to work down the list of methods and figuring out what does what X-Git-Tag: release_0.009004~26 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=adb30a8ac700a4a4f26dafaaef0806c05fd8768a;hp=2daa653a58384970b813ea933d125c4a88dad853;p=catagits%2FHTML-Zoom.git starting to work down the list of methods and figuring out what does what --- diff --git a/lib/HTML/Zoom/FilterBuilder.pm b/lib/HTML/Zoom/FilterBuilder.pm index e07c557..7b0eea0 100644 --- a/lib/HTML/Zoom/FilterBuilder.pm +++ b/lib/HTML/Zoom/FilterBuilder.pm @@ -312,8 +312,8 @@ HTML::Zoom::FilterBuilder - Add Filters to a Stream ->replace_content('Hello World') ->select('body') ->replace_content($body) - ->select('#stuff p') - ->add_to_attribute(class=>'body') + ->select('p') + ->set_attribute(class=>'para') ->to_html; will produce: @@ -329,7 +329,8 @@ will produce: Hello World
-

Stuff

+

Well Now

+

Is the Time

diff --git a/t/synopsis/filterbuilder.t b/t/synopsis/filterbuilder.t index 9769c3d..59048ae 100644 --- a/t/synopsis/filterbuilder.t +++ b/t/synopsis/filterbuilder.t @@ -18,7 +18,8 @@ MAIN my $body = HTML::Zoom ->from_html(< -

Stuff

+

Well Now

+

Is the Time

BODY @@ -27,6 +28,8 @@ my $output = $root ->replace_content('Hello World') ->select('body') ->replace_content($body) +->select('p') +->set_attribute(class=>'para') ->to_html; @@ -36,7 +39,8 @@ my $expect = <Hello World
-

Stuff

+

Well Now

+

Is the Time