NAME
Template::Extract::Run - Apply compiled regular expressions on documents
SYNOPSIS
use Template::Extract::Run;
use Data::Dumper;
open FH, '<', 'stored_regex' or die $!;
my $regex = join('', <FH>);
close FH;
my $document = << '.';
<html><head><title>Great links</title></head><body>
<ul><li><A HREF="http://slashdot.org">News for nerds.</A>: A+ - nice.
this text is ignored.</li>
<li><A HREF="http://microsoft.com">Where do you want...</A>: Z! - yeah.
this text is ignored, too.</li></ul>
.
print Data::Dumper::Dumper(
Template::Extract::Run->new->run($regex, $document)
);
DESCRIPTION
This module applies a regular expression generated by Template::Extract::Compile to a document.
METHODS
new()
Constructor. Currently takes no parameters.
run($regex, $document, \%values)
Applying $regex
on $document
and returning the resulting \%values
. This process does not make use of the Template Toolkit or any other modules.
SEE ALSO
Template::Extract, Template::Extract::Compile
AUTHORS
Autrijus Tang <autrijus@autrijus.org>
COPYRIGHT
Copyright 2004, 2005 by Autrijus Tang <autrijus@autrijus.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.