/[cvs]/nfo/perl/libs/Data/Query/Filter/Regexp.pm
ViewVC logotype

Diff of /nfo/perl/libs/Data/Query/Filter/Regexp.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by joko, Thu Mar 27 15:31:03 2003 UTC revision 1.5 by joko, Tue May 13 07:45:21 2003 UTC
# Line 2  Line 2 
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  ##  ##
# Line 57  sub _init { Line 60  sub _init {
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(
# Line 68  sub _init { Line 70  sub _init {
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  }  }
# Line 79  sub run { Line 82  sub run {
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
# Line 92  sub run { Line 95  sub run {
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 {

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed