Skip to content

Instantly share code, notes, and snippets.

@jnareb
Created January 10, 2011 11:02
Show Gist options
  • Select an option

  • Save jnareb/772641 to your computer and use it in GitHub Desktop.

Select an option

Save jnareb/772641 to your computer and use it in GitHub Desktop.
fixed snippet from HTML::Zoom manpage (proposal)
sub code_stream (&) {
my $code = shift;
return sub {
HTML::Zoom::CodeStream->new({
code => $code,
});
}
}
$zoom->select('.item')->repeat(code_stream {
if (my $name = shift @list) {
return sub { $_->select('.item-name')->replace_content($name) }
} else {
return
}
}, { flush_before => $flush });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment