/[Grep]/lib/Grep/Source.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/Grep/Source.pm

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

revision 74 by dpavlin, Fri Feb 23 17:16:33 2007 UTC revision 82 by dpavlin, Fri Feb 23 18:10:26 2007 UTC
# Line 158  sub content_class { Line 158  sub content_class {
158    
159          foreach my $s ( $self->sources ) {          foreach my $s ( $self->sources ) {
160                  Jifty->log->debug("testing source class $s");                  Jifty->log->debug("testing source class $s");
161                  if ($s->can('content_have') && $s->content_have( $content ) ) {                  if ( $s->can('content_have') ) {
162                          Jifty->log->debug("${s}->content_have succesful");                          my $regex =     $s->content_have( $content ) or
163                          return "$s";                                  die "${s}->content_have didn't return anything";
164                            die "${s}->content_have didn't return regex but ", dump( $regex ), " ref ", ref( $regex )
165                                    unless ( ref($regex) eq 'Regexp' );
166                            if ( $content =~ $regex ) {
167                                    Jifty->log->debug("${s}->content_have succesful");
168                                    return $s;
169                            }
170                  }                  }
171          }          }
172  }  }

Legend:
Removed from v.74  
changed lines
  Added in v.82

  ViewVC Help
Powered by ViewVC 1.1.26