From: John Napiorkowski Date: Thu, 23 Sep 2010 02:55:20 +0000 (-0400) Subject: got going on docs and a start on a reasonable synopsis X-Git-Tag: release_0.009004~37 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=244252e7beb958c80df624beb208033b736058c2;hp=f6644c714de7a713bb9a409d7fd85b1d26295a4f;p=catagits%2FHTML-Zoom.git got going on docs and a start on a reasonable synopsis --- diff --git a/lib/HTML/Zoom/FilterBuilder.pm b/lib/HTML/Zoom/FilterBuilder.pm index a5ba5f4..0fc9426 100644 --- a/lib/HTML/Zoom/FilterBuilder.pm +++ b/lib/HTML/Zoom/FilterBuilder.pm @@ -280,6 +280,45 @@ sub repeat_content { HTML::Zoom::FilterBuilder - Add Filters to a Stream +=head1 SYNOPSIS + +use strict; +use warnings; + + use HTML::Zoom; + my $root = HTML::Zoom + ->from_html(< + + Default Title + + + Default Content + + + MAIN + + my $body = HTML::Zoom + ->from_html(< +

Stuff

+

Stuff

+ + BODY + + print $root + ->select('title') + ->replace_content('Hello World') + ->select('body') + ->replace_content($body) + ->select('#p1') + ->replace_content(sub { + ## Ask mst... + + }) + ->to_html; + + =head1 DESCRIPTION Given a L stream, provide methods to apply filters which @@ -331,7 +370,8 @@ This class defines the following public API =head2 replace_content - TBD +Given a L result, replace the content with a string, array +or another L object. =head2 repeat