Changeset 88 in bookmarks for trunk/lib/Bookmarks.pm


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/lib/Bookmarks.pm

    r84 r88  
    77 
    88use Bookmark; 
    9 use Bookmarks::List; 
    109use Bookmarks::Search; 
    1110 
     
    10099} 
    101100 
    102 sub get_bookmarks { 
     101sub search { 
    103102    my $self = shift; 
    104103    my $params = shift || {}; 
     
    130129        }); 
    131130    } 
    132     return Bookmarks::List->new({ 
    133         bookmarks => $self, 
    134         search    => $search, 
    135         results   => \@resources, 
    136     }); 
     131    $search->results(\@resources); 
     132 
     133    return $search; 
    137134} 
    138135 
Note: See TracChangeset for help on using the changeset viewer.