Subject: | Sloppy use of '||' |
Bug forwarded from Debian user:
$item->{author} || $item->{dc}{creator};
Woah unto an author named "0", who will be passed over for the creator.
$item->{guid} || $item->{link};
"0" is a not very good, but conceivable guid.
$feed->{rss}->channel('language') ||
$feed->{rss}->channel->{dc}{language};
There is probably not a language named "0", but why build this
assumption
into the code?
$feed->{rss}->channel('generator') ||
$feed->{rss}->channel->{'http://webns.net/mvcb/'}
{generatorAgent};
This makes me *want* to name my feed generator "0".
$feed->{rss}->channel('webMaster') ||
$feed->{rss}->channel->{dc}{creator};
..
This is probably not an exhaustive list, I only looked in RSS.pm.
The original bug is http://bugs.debian.org/cgi-bin/bugreport.cgi?
bug=463773