/[Grep]/lib/Grep/Action/Search.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/Action/Search.pm

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

revision 58 by dpavlin, Wed Feb 21 16:19:31 2007 UTC revision 59 by dpavlin, Wed Feb 21 19:11:06 2007 UTC
# Line 42  use Jifty::Action schema { Line 42  use Jifty::Action schema {
42  sub take_action {  sub take_action {
43      my $self = shift;      my $self = shift;
44    
45          my $q = $self->argument_value('q') || warn "no q?";          my $q = $self->argument_value('q');
46    
47          my $coll = Grep::Search->collection( $q );          return $self->result->error("Need search query") unless ($q);
48    
49          Jifty->log->error('result not collection but ', dump( $coll ))          my $coll = Grep::Search->collection( $q ) ||
50                  unless ( $coll->isa('Jifty::Collection') );                  return $self->result->error("No results");
51    
52            $self->log->fatal('result not collection but ', dump( $coll ))
53                    if ( !$coll || !$coll->isa('Jifty::Collection') );
54    
55          my $results = $coll->count;          my $results = $coll->count;
56    

Legend:
Removed from v.58  
changed lines
  Added in v.59

  ViewVC Help
Powered by ViewVC 1.1.26