# Add bookmarks.
my $outline = $ol_root->outline;
$outline->title("Bookmarks");
$outline->closed;
my @tops =
map { $_->[0] }
sort { $a->[1] cmp $b->[1] }
map { [ $_ => s/^song_([0-9]+)$/sprintf("song_%06d",$1)/er ] }
grep { ! /^(?:cover|front|toc|back)$/ }
keys %{ $self->{_nd} };
for ( "cover", "front", "toc", @tops, "back" ) {
next unless my $p = $self->{_nd}->{$_};
my $ol = $outline->outline;
$ol->title($_);
if ( my $c = $ol->can("destination") ) {
$c->( $ol, $p );
}
else {
$ol->dest($p);
}
}