>>
// Following is a table having a list of details for available RSS feeds to process.
-|| The more rows have here the longer it takes to fetch them, what is it, once a day, week, month?
-<< RSS_FEEDS <DATA> __CONST__
+|| The more rows we have here the longer it takes to fetch them, what is it, once a day, week, month?
+|| The _CONST_ meta makes the property a CNF constant just in case.
+|| The _HAS_HEADER_ meta makes it compatible with the new and old parser.
+<< RSS_FEEDS <DATA> __CONST__ _HAS_HEADER_
ID`Name`URL`Expires`Description~
#`CPAN`http://search.cpan.org/uploads.rdf`
$ptr = $$ptr;
}
my @header = @$ptr;
- my @data = CNFMeta::_deRefArray($$table->{data});
+ my @data = @{$$table->{data}};
for my $idx (0 .. $#data){
my @col = @{$data[$idx]};
if($idx==0){
}
my $page;
my @header = @$ptr;
- my @data = @{$$table->{data}};
my $cgi = $parser->const('CGI');
my $feed = $cgi->param('feed') if $cgi;
my @lbls = CNFMeta::_deRefArray($header[0]);
+ $ptr = $$table->{data};
+ my @data = @$ptr;
my %hdr;
for(my $i=0;$i<@lbls;$i++){ #<- Column names are set here, if names in script are changed, They must be changed bellow.
$hdr{$lbls[$i]} = $i
}
- $parser->log("Feed request:$feed") if$feed;
+ $parser->log("Feed request:$feed data.size:" .scalar(@data)) if$feed;
+ try{
for my $idx (0 .. $#data){
my @col = @{$data[$idx]};
+ #$parser->log("Feed spec: @col");
my $name = $col[$hdr{Name}];
next if($feed && $feed ne $name);
- my $tree = fetchFeed($self, $name, $col[$hdr{URL}], $col[$hdr{Description}]);
+ my $tree = fetchFeed($self, $name, $col[$hdr{URL}], $col[$hdr{Expires}], $col[$hdr{Description}]);
$parser->log("Fetched feed:".$name);
if($tree && ref($$tree) eq 'CNFNode'){
if(not isCNFTrue($self->{CNF_TREE_LOADED}) && isCNFTrue($self->{CNF_TREE_STORE})){
$parser-> warn("Feed '$name' bailed to return a CNFNode tree.")
}
}
+ }catch{
+ $parser-> error("RSSFeedsPlugin\@collectFeeds() Error:$@")
+ }
$parser->data()->{PAGE} = \$page if $page;
}
### PerlCNF TREE to HTML Conversion Routine, XML based RSS of various Internet feeds convert to PerlCNF previously.