Changeset 127 in bookmarks for trunk/lib


Ignore:
Timestamp:
10/20/16 21:35:13 (8 years ago)
Author:
peter
Message:

Make it clear that add takes a hash not an object.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Bookmarks.pm

    r106 r127  
    227227sub add { 
    228228    my $self = shift; 
    229     my $bookmark = shift; 
     229    my $params = shift; 
    230230 
    231231    #TODO: accept a pre-made Bookmark object in addition to a hash 
    232     my $uri = $bookmark->{uri}; 
    233     my $title = $bookmark->{title}; 
    234     my $ctime = $bookmark->{ctime} || time; 
    235     my $mtime = $bookmark->{mtime} || $ctime; 
    236     my $id = $bookmark->{id}; 
     232    my $uri = $params->{uri}; 
     233    my $title = $params->{title}; 
     234    my $ctime = $params->{ctime} || time; 
     235    my $mtime = $params->{mtime} || $ctime; 
     236    my $id = $params->{id}; 
    237237 
    238238    # create an entry for the resource 
     
    271271    } 
    272272 
    273     my $changed_tags = $self->_update_tags($uri, $bookmark->{tags}); 
     273    my $changed_tags = $self->_update_tags($uri, $params->{tags}); 
    274274 
    275275    if ($bookmark_exists && $changed_tags) { 
Note: See TracChangeset for help on using the changeset viewer.