Changeset 25 in bookmarks for trunk/BookmarkApp.pm


Ignore:
Timestamp:
05/23/13 00:37:57 (11 years ago)
Author:
peter
Message:
  • Bookmark uses Moose
    • the Bookmarks base_uri should be passed to the constructor to set the bookmark_uri attribute of the Bookmark
    • added a TO_JSON method to serialize the URIs to strings for JSON
  • use JSON::convert_blessed to trigger calling Bookmark::TO_JSON
  • added a private _sth_tags_from_uri attribute to Bookmarks
  • Bookmarks::get_tags can be called with a uri parameter to fetch a list of tags for that resource
  • Bookmarks::get_bookmark() returns a Bookmark object
  • Bookmarks::get_resources() returns an array of Bookmark objects
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BookmarkApp.pm

    r24 r25  
    9090        ); 
    9191        return decode_utf8( 
    92             encode_json({ 
     92            JSON->new->utf8->convert_blessed->encode({ 
    9393                bookmarks => \@resources, 
    9494            }) 
Note: See TracChangeset for help on using the changeset viewer.