File Coverage

blib/lib/Netscape/Bookmarks/Separator.pm
Criterion Covered Total %
statement 20 22 90.9
branch 2 2 100.0
condition n/a
subroutine 6 8 75.0
pod 4 4 100.0
total 32 36 88.8


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             THIS IS AN ABANDONED MODULE. THERE IS NO SUPPORT. YOU CAN ADOPT IT
26             IF YOU LIKE: https://pause.perl.org/pause/query?ACTION=pause_04about#takeover
27              
28             Store a Netscape bookmark separator object.
29              
30             =head1 METHODS
31              
32             =over 4
33              
34             =cut
35              
36 6     6   55034 use strict;
  6         20  
  6         181  
37              
38 6     6   28 use base qw( Netscape::Bookmarks::AcceptVisitor Netscape::Bookmarks::Isa );
  6         9  
  6         1028  
39 6     6   35 use subs qw();
  6         12  
  6         108  
40 6     6   33 use vars qw( $VERSION );
  6         13  
  6         861  
41              
42             $VERSION = "2.304";
43              
44             my $singleton = undef;
45              
46             =item Netscape::Bookmarks::Separator->new
47              
48             Creates a new Separator object. This method takes no arguments.
49             This object represents a Singleton object. The module only
50             makes on instance which everybody else shares.
51              
52             =cut
53              
54             sub new {
55 6 100   6 1 580 return $singleton if defined $singleton;
56              
57 3         8 my $class = shift;
58              
59 3         7 my $n = '';
60 3         6 my $self = \$n;
61              
62 3         7 bless $self, $class;
63              
64 3         6 $singleton = $self;
65              
66 3         6 $singleton;
67             }
68              
69             =item $obj->as_string
70              
71             Prints the separator object in the Netscape bookmark format. One should
72             not have to do this as Netscape::Bookmarks::Category will take care of it.
73              
74             =cut
75              
76 2     2 1 5 sub as_string { "
" }
77              
78             =item $obj->title
79              
80             Prints a string to represent a separator. This method exists to
81             round out polymorphism among the Netscape::* classes. The
82             string does not have a trailing newline.
83              
84             =cut
85              
86 0     0 1   sub title { "-" x 50 }
87              
88             =item $obj->remove
89              
90             Performs any clean up necessary to remove this object from the
91             Bookmarks tree.
92              
93             =cut
94              
95 0     0 1   sub remove { 1; }
96              
97             "if you want to believe everything you read, so be it.";
98              
99             =back
100              
101             =head1 AUTHOR
102              
103             brian d foy C<< >>
104              
105             =head1 COPYRIGHT AND LICENSE
106              
107             Copyright © 2002-2019, brian d foy . All rights reserved.
108              
109             This program is free software; you can redistribute it and/or modify
110             it under the terms of the Artistic License 2.0.
111              
112             =head1 SEE ALSO
113              
114             L
115              
116             =cut