- }
-}
-
-sub initrss {
- my $self=shift; # this is not a method but we cheat
- my $fullpath=$self->{-fullpath};
- my $depth=20;
-
- return;
- return "" unless $rssfile;
-
- my $rss=$rssfile;
- while ( ! -f $fullpath."/".$rss ) {
- $rss = "../".$rss;
- last unless ($depth-- > 0);
- }
- if ($depth > 0) {
- $rssobj->{'file'} = $rss;
- $rssobj->{'rss'} = new XML::RSS (version=>2);
- $rssobj->{'rss'}->parsefile($rss);
- my $itemstodel = @{$rssobj->{'rss'}->{'items'}} - 15;
- while ($itemstodel-- > 0) {
- pop(@{$rssobj->{'rss'}->{'items'}})
- }
- $rssobj->{'rss'}->save($rssobj->{'file'});
- return $rss;
- } else {
- print STDERR "There is no $rssfile in this or parent ".
- "directories, you must create one with mkgalrss.pl\n";
- exit 1;