use HTML::Zoom::ZConfig;
use HTML::Zoom::MatchWithoutFilter;
+use HTML::Zoom::ReadFH;
sub new {
my ($class, $args) = @_;
});
}
+sub from_file {
+ my $self = shift->_self_or_new;
+ my $filename = shift;
+ $self->from_html(do { local (@ARGV, $/) = ($filename); <> });
+}
+
sub to_stream {
my $self = shift;
die "No events to build from - forgot to call from_html?"
$stream
}
+sub to_fh {
+ HTML::Zoom::ReadFH->from_zoom(shift);
+}
+
+sub run {
+ my $self = shift;
+ $self->zconfig->stream_utils->stream_to_array($self->to_stream);
+ return
+}
+
+sub apply {
+ my ($self, $code) = @_;
+ local $_ = $self;
+ $self->$code;
+}
+
sub to_html {
my $self = shift;
$self->zconfig->producer->html_from_stream($self->to_stream);