Bookmarks::Opera - Opera style bookmarks.
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);
A subclass of Bookmarks::Parser for handling Opera bookmarks.
get_header_as_string
get_item_as_string
get_footer_as_string
See Bookmarks::Parser for these methods.
Jess Robinson <castaway@desert-island.demon.co.uk>
Cosimo Streppone <cosimo@cpan.org>
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
To install Bookmarks::Parser, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bookmarks::Parser
CPAN shell
perl -MCPAN -e shell install Bookmarks::Parser
For more information on module installation, please visit the detailed CPAN module installation guide.