WWW/FetchStory/Fetcher/Default.pm

filter: Statementstmt 57.8% 11 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 100% 3 / 3 totaltotal 60.7% 17 / 28 CC 1 SCAR 4.1
CC
1
Cov
58%
info
2.0
priority
2.0
allow
2.0
CRAP 1.5
« WWW/FetchStory/Fetcher/TwistingHellmouth.pm ↑ Summary
1 package WWW::FetchStory::Fetcher::Default;
2 1 $WWW::FetchStory::Fetcher::Default::VERSION = '0.2602';
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 =head1 NAME
6  
7 WWW::FetchStory::Fetcher::Default - default fetching module for WWW::FetchStory
8  
9 =head1 VERSION
10  
11 version 0.2602
12  
13 =head1 DESCRIPTION
14  
15 This is the default story-fetching plugin for WWW::FetchStory.
16  
17 =cut
18  
19 1 ▶use parent qw(WWW::FetchStory::Fetcher);
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 =head1 METHODS
22  
23 =head2 info
24  
25 Information about the fetcher.
26  
27 $info = $self->info();
28  
29 =cut
30  
31 0 ▶sub info {
Subroutine info: not called CC=1 SCAR=6.9
Pod documented
32 0 my $self = shift;
33
34 0 my $info = "Default fetcher (does not do much)";
35  
36 0 return $info;
37 } # info
38  
39  
40 =head2 priority
41  
42 The priority of this fetcher. Fetchers with higher priority
43 get tried first. This is useful where there may be a generic
44 fetcher for a particular site, and then a more specialized fetcher
45 for particular sections of a site. For example, there may be a
46 generic LiveJournal fetcher, and then refinements for particular
47 LiveJournal community, such as the sshg_exchange community.
48 This works as either a class function or a method.
49  
50 This must be overridden by the specific fetcher class.
51  
52 $priority = $self->priority();
53  
54 $priority = WWW::FetchStory::Fetcher::priority($class);
55  
56 =cut
57  
58 0 ▶sub priority {
Subroutine priority: not called CC=1 SCAR=6.9
Pod documented
59 0 my $class = shift;
60  
61 0 return 0;
62 } # priority
63  
64 =head2 allow
65  
66 If this fetcher can be used for the given URL, then this returns
67 true.
68 This must be overridden by the specific fetcher class.
69  
70 if ($obj->allow($url))
71 {
72 ....
73 }
74  
75 =cut
76  
77 0 ▶sub allow {
Subroutine allow: not called CC=1 SCAR=6.9
Pod documented
78 0 my $self = shift;
79 0 my $url = shift;
80  
81 0 return 1;
82 } # allow
83  
84 1 1; # End of WWW::FetchStory::Fetcher
85 __END__
« WWW/FetchStory/Fetcher/TwistingHellmouth.pm ↑ Summary