2 |
## $Id$ |
## $Id$ |
3 |
## ------------------------------------------------------------------------ |
## ------------------------------------------------------------------------ |
4 |
## $Log$ |
## $Log$ |
5 |
|
## Revision 1.5 2003/05/13 07:45:21 joko |
6 |
|
## now returns report |
7 |
|
## |
8 |
## Revision 1.4 2003/03/27 15:31:03 joko |
## Revision 1.4 2003/03/27 15:31:03 joko |
9 |
## fixes to modules regarding new namespace(s) below Data::Mungle::* |
## fixes to modules regarding new namespace(s) below Data::Mungle::* |
10 |
## |
## |
60 |
|
|
61 |
# try to load filter-declaration from configuration scope inside perl-module (yes - it's already abstracted out there!) |
# try to load filter-declaration from configuration scope inside perl-module (yes - it's already abstracted out there!) |
62 |
$self->{declaration} = DesignPattern::Object->fromPackage($self->{module}); |
$self->{declaration} = DesignPattern::Object->fromPackage($self->{module}); |
63 |
#print Dumper($self->{declaration}); |
#print Dumper($self->{declaration}); |
|
|
|
64 |
|
|
65 |
# the regexp-object which does the hard work for us ;-) |
# the regexp-object which does the hard work for us ;-) |
66 |
$self->{regexp} = Regexp::Group->new( |
$self->{regexp} = Regexp::Group->new( |
70 |
'patterns' => $self->{declaration}->patterns(), |
'patterns' => $self->{declaration}->patterns(), |
71 |
'coderefs' => $self->{declaration}->coderefs(), |
'coderefs' => $self->{declaration}->coderefs(), |
72 |
'verbose' => 1, |
'verbose' => 1, |
73 |
|
'LOG_VERBOSE' => 0, |
74 |
); |
); |
75 |
|
|
76 |
} |
} |
82 |
|
|
83 |
#print "cb: $coderef", "\n"; |
#print "cb: $coderef", "\n"; |
84 |
|
|
85 |
my $result = $self->{regexp}->scan($steps, $coderef); |
$self->{regexp}->scan($steps, $coderef); |
86 |
|
|
87 |
# configure tracing |
# configure tracing |
88 |
# respects additional trace-options passed to _trace-method |
# respects additional trace-options passed to _trace-method |
95 |
#$self->trace('matches after Regexp::Group->scan', $self->{regexp}->getMatches(), 1, undef, { tag => '', exit => 0 }); |
#$self->trace('matches after Regexp::Group->scan', $self->{regexp}->getMatches(), 1, undef, { tag => '', exit => 0 }); |
96 |
#$self->trace('results after Regexp::Group->scan', $self->{regexp}->getResults(), 1, undef, { tag => '', exit => 0 }); |
#$self->trace('results after Regexp::Group->scan', $self->{regexp}->getResults(), 1, undef, { tag => '', exit => 0 }); |
97 |
|
|
98 |
return $result; |
return $self->{regexp}->get_report(); |
99 |
} |
} |
100 |
|
|
101 |
sub index { |
sub index { |