Adam Spiers > URI-Bookmarks-0.92 > URI::Bookmarks

Download:
URI-Bookmarks-0.92.tar.gz

Dependencies

Annotate this POD

Related Modules

HTML::Parser
Tree::DAG_Node
URI::Bookmark
more...
By perlmonks.org

CPAN RT

Open  0
Report a bug
Module Version: 0.92   Source  

NAME ^

URI::Bookmarks - Perl module class encapsulating bookmark files

SYNOPSIS ^

  use URI::Bookmarks;

  # URI::Bookmarks automagically detects that we're dealing with a
  # collection of Netscape bookmarks

  my $bookmarks =
    new URI::Bookmarks(file => "$ENV{HOME}/.netscape/bookmarks.html");

  my $bookmarks = new URI::Bookmarks(handle => $fh);

  my $bookmarks = new URI::Bookmarks(array => \@lines);
  
  # Manipulate $bookmarks using nice tree methods from Tree::DAG_Node,
  # e.g. delete all bookmarks under $folder:
  ($bookmarks->name_to_nodes($folder))[0]->unlink_from_mother();

  # Then output the new file.
  print $bookmarks->export('Netscape array');

DESCRIPTION ^

URI::Bookmarks provides a class for manipulating hierarchical collections of bookmarks. Each entry in the collection is an object of type URI::Bookmark, which is in turn a subclass of Tree::DAG_Node, and hence all standard tree manipulation methods are available (see the documentation for Tree::DAG_Node).

BUGS ^

The file key of new() might not be safe.

AUTHOR ^

Adam Spiers <adam@spiers.net>

SEE ALSO ^

URI::Bookmarks::*, URI::Bookmark, URI::Bookmark::*, perl(1).