Subject: | pop, not shift in usage summary? |
I tested this out, and I think it should be 'shift', not 'pop', to get
the oldest item, if items are added via the default 'append' mode,
rather than 'insert'. I tested this with mode => 'append' and had to
use shift rather than pop.
# insert an item into an RSS file and removes the oldest item
if
# there are already 15 items
my $rss = new XML::RSS;
$rss->parsefile("fm.rdf");
pop(@{$rss->{'items'}}) if (@{$rss->{'items'}} == 15);