File Coverage

blib/lib/Feed/Data/AlJazeera.pm
Criterion Covered Total %
statement 29 29 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod n/a
total 39 39 100.0


line stmt bran cond sub pod time code
1             package Feed::Data::AlJazeera;
2              
3 2     2   313496 use 5.006; use strict; use warnings; our $VERSION = '0.04';
  2     2   9  
  2     2   13  
  2         4  
  2         97  
  2         13  
  2         4  
  2         185  
4 2     2   2044 use Rope; use Rope::Autoload;
  2     2   31302  
  2         18  
  2         2075  
  2         8495  
  2         19  
5              
6 2     2   1513 use Feed::Data::AlJazeera::English;
  2         9  
  2         106  
7 2     2   1424 use Feed::Data::AlJazeera::Arabic;
  2         8  
  2         83  
8 2     2   1131 use Feed::Data::AlJazeera::Mubasher;
  2         7  
  2         94  
9 2     2   1198 use Feed::Data::AlJazeera::Documentary;
  2         6  
  2         86  
10 2     2   1161 use Feed::Data::AlJazeera::Balkans;
  2         8  
  2         540  
11              
12             property urls => (
13             initable => 1,
14             enumerable => 0,
15             writeable => 0,
16             builder => sub {
17             my %urls = (
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             my $base = 'Feed::Data::AlJazeera::';
26             for (keys %urls) {
27             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             url => $urls{$_}
36             )
37             };
38             }
39              
40             return \%urls
41             }
42             );
43              
44             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