Skip to content

Commit

Permalink
bugfix for format processing
Browse files Browse the repository at this point in the history
  • Loading branch information
mstratman committed Mar 23, 2011
1 parent e34acce commit 3c26904
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/Catalyst/View/XML/Feed.pm
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ sub _make_feed_recognizable {
? $self->default_format
: $feed->{format};
my @format;
if (ref $feed->{format}) {
if ($format) {
# Docs for this say format should be a string ('RSS 2.0'), but
# format can also be XML::Feed style ('RSS', version => '2.0')
# since all other attributes are like XML::Feed
@format = ref $feed->{format} eq 'ARRAY'
? @{ $feed->{format} }
: %{ $feed->{format} };
@format = ref $format eq 'ARRAY'
? @$format
: %$format;
} else {
@format = split /\s+/, $feed->{format};
@format = split /\s+/, $format;
}
if (scalar(@format) > 1) {
splice @format, 1, 0, 'version';
Expand Down

0 comments on commit 3c26904

Please sign in to comment.