Changeset 88 in bookmarks for trunk/bkmk


Ignore:
Timestamp:
06/04/15 22:00:25 (9 years ago)
Author:
peter
Message:

Better separation of the model for searching and the web app controller/representation layer

  • renamed Bookmarks::get_bookmarks() to search()
  • Bookmarks::search() now returns a Bookmarks::Search object instead of a Bookmarks::List
  • search results now reside in the Bookmarks::Search class
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bkmk

    r87 r88  
    4646    list => sub { 
    4747        my @tags = @_; 
    48         my $resources = $bookmarks->get_bookmarks({ 
     48        my $resources = $bookmarks->search({ 
    4949            tags => \@tags 
    5050        }); 
     
    7777    dump => sub { 
    7878        my ($dump_file) = @_; 
    79         my $dump = [ map { $_->TO_JSON } @{ $bookmarks->get_bookmarks->results } ]; 
     79        my $dump = [ map { $_->TO_JSON } @{ $bookmarks->search->results } ]; 
    8080        $dump_file ? YAML::DumpFile($dump_file, $dump) : print Dump($dump); 
    8181    }, 
Note: See TracChangeset for help on using the changeset viewer.