Permalink
Browse files

make sources() behave properly with the ':all' category

  • Loading branch information...
1 parent 0c8a5d4 commit e5a867d86cf67fbc79f3a204041481d92b159be0 @book committed May 4, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/Acme/MetaSyntactic/RemoteList.pm
@@ -38,8 +38,10 @@ sub sources {
return @$src;
}
elsif ( ref $src eq 'HASH' ) {
- return
- map { ref $_ ? @$_ : $_ } $_[1] ? $src->{ $_[1] } : values %$src;
+ return defined $_[1] && $_[1] ne ':all'
+ ? ref $_[1] ? @$src{ @{ $_[1] } }
+ : $src->{ $_[1] }
+ : values %$src;
}
return $src;
}
@@ -231,6 +233,8 @@ Return the list of source URL. The C<$category> parameter can be used
to select the sources for a sub-category of the theme (in the case of
C<Acme::MetaSyntactic::MultiList>).
+C<$category> can be an array reference containing a list of categories.
+
=item extract( $content )
Return a list of items from the C<$content> string. C<$content> is

0 comments on commit e5a867d

Please sign in to comment.