The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

URI::Bookmark - Perl module class encapsulating an entry in a typical bookmark file.

SYNOPSIS

See URI::Bookmarks.

DESCRIPTION

URI::Bookmark is a subclass of Tree::DAG_Node, so that each entry in the bookmark collection is a node in a directed acyclic graph.

All methods from Tree::DAG_Node are available.

Each instance has a type, which can be:

   `root'       --  the root of the bookmark tree (this is also a folder)
   `folder'     --  a folder containing more entries 
   `bookmark'   --  a bookmark (duh)
   `rule'       --  a horizontal rule separating entries

METHODS

  • set_attribs

      $bookmark->set_attribs(name => 'Slashdot',
                             type => bookmark,
                             HREF => 'http://slashdot.org');

    This method should be self-explanatory. The allowed attributes are: `name', `type', `HREF', `ADD_DATE', `LAST_MODIFIED', `LAST_VISIT', `ALIASOF', `ALIASID', `description'. Attempts to set any others will be ignored and generate a warning.

  • dump_attribs

      $bookmark->dump_attribs();

    Dumps all attribute (key, value) pairs for this node, one per line. This is only really for debugging.

  • type

      my $type = $bookmark->type();
    
      $bookmark->type($new_type);

    If a parameter is specified, sets the bookmark to the type given by it. Generates a warning if the type given isn't valid.

    Returns the current type of the bookmark.

AUTHOR

Adam Spiers <adam@spiers.net>

SEE ALSO

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