AlJazeera.pm

filter: Statementstmt 100% 38 / 38 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 11 / 11 Podpod n/a totaltotal 100% 49 / 49 CC 2 SCAR 1.5
CC
2
Cov
100%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« AlJazeera/Base.pm ↑ Summary AlJazeera/Arabic.pm »
1 package Feed::Data::AlJazeera;
2  
3 2 ▶use 5.006; use strict; use warnings; our $VERSION = '0.04';
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Rope; use Rope::Autoload;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Feed::Data::AlJazeera::English;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use Feed::Data::AlJazeera::Arabic;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use Feed::Data::AlJazeera::Mubasher;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use Feed::Data::AlJazeera::Documentary;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 ▶use Feed::Data::AlJazeera::Balkans;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 property urls => (
13 initable => 1,
14 enumerable => 0,
15 writeable => 0,
16 builder => sub {
17 1 ▶ my %urls = (
Subroutine __ANON__: called CC=2 SCAR=6.9
18 english => 'https://www.aljazeera.com/xml/rss/all.xml',
19 arabic => 'https://www.aljazeera.net/aljazeerarss/a7c186be-1baa-4bd4-9d80-a84db769f779/73d0e1b4-532f-45ef-b135-bfdff8b8cab9',
20 mubasher => 'https://www.aljazeeramubasher.net/rss.xml',
21 documentary => 'https://doc.aljazeera.net/xml/rss/all.xml',
22 balkans => 'https://balkans.aljazeera.net/rss.xml',
23 );
24
25 1 my $base = 'Feed::Data::AlJazeera::';
26 1 for (keys %urls) {
27 5 my $mod = $base . ucfirst($_);
28 $_[0]->{properties}->{$_} = {
29 index => $_[0]->{index}++,
30 initable => 1,
31 enumerable => 1,
32 writeable => 0,
33 configurable => 1,
34 value => $mod->new(
35 5 url => $urls{$_}
36 )
37 };
38 }
39  
40 1 return \%urls
41 }
42 2 );
43  
44 2 1;
45  
46 __END__
47  
48 =head1 NAME
49  
50 Feed::Data::AlJazeera - AlJazeera rss feeds
51  
52 =head1 VERSION
53  
54 Version 0.04
55  
56 =head1 SYNOPSIS
57  
58 use Feed::Data::AlJazeera;
59  
60 my $al_jazeera = Feed::Data::AlJazeera->new();
61  
62 for my $feed (qw/english arabic mubasher documentary balkans/) {
63 my $data = $al_jazeera->$feed;
64 $data->parse;
65 $data->render;
66 }
67  
68 =head1 SUBROUTINES/METHODS
69  
70 =head2 english
71  
72 =head2 arabic
73  
74 =head2 mubasher
75  
76 =head2 documentary
77  
78 =head2 balkans
79  
80 =head1 AUTHOR
81  
82 LNATION, C<< <email at lnation.org> >>
83  
84 =head1 BUGS
85  
86 Please report any bugs or feature requests to C<bug-feed-data-aljazeera at rt.cpan.org>, or through
87 the web interface at L<https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Feed-Data-AlJazeera>. I will be notified, and then you'll
88 automatically be notified of progress on your bug as I make changes.
89  
90 =head1 SUPPORT
91  
92 You can find documentation for this module with the perldoc command.
93  
94 perldoc Feed::Data::AlJazeera
95  
96 You can also look for information at:
97  
98 =over 4
99  
100 =item * RT: CPAN's request tracker (report bugs here)
101  
102 L<https://rt.cpan.org/NoAuth/Bugs.html?Dist=Feed-Data-AlJazeera>
103  
104 =item * CPAN Ratings
105  
106 L<https://cpanratings.perl.org/d/Feed-Data-AlJazeera>
107  
108 =item * Search CPAN
109  
110 L<https://metacpan.org/release/Feed-Data-AlJazeera>
111  
112 =back
113  
114 =head1 ACKNOWLEDGEMENTS
115  
116 =head1 LICENSE AND COPYRIGHT
117  
118 This software is Copyright (c) 2024 by LNATION.
119  
120 This is free software, licensed under:
121  
122 The Artistic License 2.0 (GPL Compatible)
123  
124 =cut
125  
126 1; # End of Feed::Data::AlJazeera
« AlJazeera/Base.pm ↑ Summary AlJazeera/Arabic.pm »