fix 'ublessed reference' - almost works
authorEugene Crosser <crosser@average.org>
Thu, 3 Jun 2010 16:59:45 +0000 (16:59 +0000)
committerEugene Crosser <crosser@average.org>
Thu, 3 Jun 2010 16:59:45 +0000 (16:59 +0000)
mkgallery.pl

index d0f056e46315e6f0f875fa76dff90392c73b6120..7a4b681a5aacb29f8be85d668c839e4bd4761122 100755 (executable)
@@ -224,11 +224,12 @@ sub initfeed {
        $feedobj->{-file} = $feedfile;
        $feedobj->{-base} = $feedbase;
        $feedobj->{-hub} = $feedhub;
-       $feedobj->{-feed} = XML::FeedPP::Atom::Atom10->new;
        if ( -f $feedobj->{-file} ) {
-               $feedobj->{-feed}->load($feedobj->{-file});
+               $feedobj->{-feed} = XML::FeedPP::Atom::Atom10->new(
+                                                       $feedobj->{-file});
                $feedobj->{-feed}->limit_item(15);
        } else {
+               $feedobj->{-feed} = XML::FeedPP::Atom::Atom10->new;
                $feedobj->{-feed}->title("Gallery");
                $feedobj->{-feed}->description("generated by ".
                        "<a href=\"http://www.average.org/mkgallery/\">".
@@ -238,8 +239,6 @@ sub initfeed {
                #$feedobj->{-feed}->language("en");
                #$feedobj->{-feed}->image($url, $tit, $link, $desc, $w, $h);
        }
-       $feedobj->{-feed}->pubDate(time);
-       $feedobj->{-feed}->to_file($feedobj->{-savepath});
        $self->{-feed} = $feedobj->{-feed};
 }