line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Netscape::Bookmarks::Separator; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=encoding utf8 |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Netscape::Bookmarks::Separator - manipulate, or create Netscape Bookmarks files |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use Netscape::Bookmarks::Category; |
12
|
|
|
|
|
|
|
use Netscape::Bookmarks::Separator; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
#add a separator to a category listing |
15
|
|
|
|
|
|
|
my $category = new Netscape::Bookmarks::Category { ... }; |
16
|
|
|
|
|
|
|
my $separator = new Netscape::Bookmarks::Separator; |
17
|
|
|
|
|
|
|
my $category->add($separator); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
#print the separator |
20
|
|
|
|
|
|
|
#note that Netscape::Category::as_string does this for you |
21
|
|
|
|
|
|
|
print $separator->as_string; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 DESCRIPTION |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Store a Netscape bookmark separator object. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 METHODS |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=over 4 |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
32
|
|
|
|
|
|
|
|
33
|
6
|
|
|
6
|
|
71663
|
use strict; |
|
6
|
|
|
|
|
23
|
|
|
6
|
|
|
|
|
225
|
|
34
|
|
|
|
|
|
|
|
35
|
6
|
|
|
6
|
|
36
|
use base qw( Netscape::Bookmarks::AcceptVisitor Netscape::Bookmarks::Isa ); |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
1279
|
|
36
|
6
|
|
|
6
|
|
44
|
use subs qw(); |
|
6
|
|
|
|
|
16
|
|
|
6
|
|
|
|
|
144
|
|
37
|
6
|
|
|
6
|
|
86
|
use vars qw( $VERSION ); |
|
6
|
|
|
|
|
20
|
|
|
6
|
|
|
|
|
1238
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
$VERSION = "2.303"; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
my $singleton = undef; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=item Netscape::Bookmarks::Separator->new |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Creates a new Separator object. This method takes no arguments. |
46
|
|
|
|
|
|
|
This object represents a Singleton object. The module only |
47
|
|
|
|
|
|
|
makes on instance which everybody else shares. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub new { |
52
|
6
|
100
|
|
6
|
1
|
941
|
return $singleton if defined $singleton; |
53
|
|
|
|
|
|
|
|
54
|
3
|
|
|
|
|
9
|
my $class = shift; |
55
|
|
|
|
|
|
|
|
56
|
3
|
|
|
|
|
8
|
my $n = ''; |
57
|
3
|
|
|
|
|
8
|
my $self = \$n; |
58
|
|
|
|
|
|
|
|
59
|
3
|
|
|
|
|
8
|
bless $self, $class; |
60
|
|
|
|
|
|
|
|
61
|
3
|
|
|
|
|
8
|
$singleton = $self; |
62
|
|
|
|
|
|
|
|
63
|
3
|
|
|
|
|
9
|
$singleton; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=item $obj->as_string |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Prints the separator object in the Netscape bookmark format. One should |
69
|
|
|
|
|
|
|
not have to do this as Netscape::Bookmarks::Category will take care of it. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |
72
|
|
|
|
|
|
|
|
73
|
2
|
|
|
2
|
1
|
9
|
sub as_string { " " } |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=item $obj->title |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Prints a string to represent a separator. This method exists to |
78
|
|
|
|
|
|
|
round out polymorphism among the Netscape::* classes. The |
79
|
|
|
|
|
|
|
string does not have a trailing newline. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=cut |
82
|
|
|
|
|
|
|
|
83
|
0
|
|
|
0
|
1
|
|
sub title { "-" x 50 } |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=item $obj->remove |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Performs any clean up necessary to remove this object from the |
88
|
|
|
|
|
|
|
Bookmarks tree. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=cut |
91
|
|
|
|
|
|
|
|
92
|
0
|
|
|
0
|
1
|
|
sub remove { 1; } |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
"if you want to believe everything you read, so be it."; |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=back |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 AUTHOR |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
brian d foy C<< >> |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Copyright © 2002-2018, brian d foy . All rights reserved. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
107
|
|
|
|
|
|
|
it under the terms of the Artistic License 2.0. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 SEE ALSO |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
L |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=cut |