Cosimo Streppone > Bookmarks-Parser-0.07 > Bookmarks::Opera

Download:
Bookmarks-Parser-0.07.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

Bookmarks::Opera - Opera style bookmarks.

SYNOPSIS ^

    use Data::Dumper;
    use Bookmarks::Parser;

    # You don't need to explicitly use Bookmarks::Opera
    my $parser = Bookmarks::Parser->new();

    # Existing Opera bookmark file
    my $file = "bookmarks.adr";

    my $bookmarks = $parser->parse({filename => $file});
    my @nodes = $bookmarks->get_top_level();
    my @tree;

    # Depth-first bookmarks tree visit
    while (@nodes) {
        my $node = shift @nodes;
        push @tree, $node;
        if ($node->{children}) {
            push @nodes, $bookmarks->get_from_id($_)
                for @{ $node->{children} };
        }
    }

    print Dumper(\@tree);

DESCRIPTION ^

A subclass of Bookmarks::Parser for handling Opera bookmarks.

METHODS ^

get_header_as_string

get_item_as_string

get_footer_as_string

See Bookmarks::Parser for these methods.

AUTHOR ^

Jess Robinson <castaway@desert-island.demon.co.uk>

Cosimo Streppone <cosimo@cpan.org>

LICENSE ^

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: