Changeset 91 in bookmarks for trunk/bkmk
- Timestamp:
- 06/05/15 19:32:33 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bkmk
r88 r91 34 34 my $identifier = shift; 35 35 my $bookmark = find_bookmark($identifier); 36 print $bookmark ? Dump($bookmark-> TO_JSON) : "Not Found\n";36 print $bookmark ? Dump($bookmark->to_hashref) : "Not Found\n"; 37 37 }, 38 38 … … 41 41 my $title = defined $TITLE ? $TITLE : fetch_title($uri); 42 42 my $bookmark = $bookmarks->add({ uri => $uri, title => $title, tags => \@tags }); 43 print Dump($bookmark-> TO_JSON);43 print Dump($bookmark->to_hashref); 44 44 }, 45 45 … … 51 51 # TODO: list by tags, date, etc. 52 52 # TODO: coordinate this commandline script with the CGI app 53 print Dump([ map { $_-> TO_JSON} @{ $resources->results } ]);53 print Dump([ map { $_->to_hashref } @{ $resources->results } ]); 54 54 }, 55 55 … … 60 60 $bookmark->tags(\@tags); 61 61 $bookmarks->update($bookmark); 62 print Dump($bookmark-> TO_JSON);62 print Dump($bookmark->to_hashref); 63 63 } else { 64 64 die "Not found\n"; … … 77 77 dump => sub { 78 78 my ($dump_file) = @_; 79 my $dump = [ map { $_-> TO_JSON} @{ $bookmarks->search->results } ];79 my $dump = [ map { $_->to_hashref } @{ $bookmarks->search->results } ]; 80 80 $dump_file ? YAML::DumpFile($dump_file, $dump) : print Dump($dump); 81 81 },
Note: See TracChangeset
for help on using the changeset viewer.