Permalink
Browse files

doc edit, warn about non-paginated methods

  • Loading branch information...
st3vil committed Nov 24, 2011
1 parent 54722e1 commit 59e6102673a6e0addc424a99a5075224da6d0088
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/Net/LastFMAPI.pm
View
@@ -239,6 +239,9 @@ sub lastfm {
unless (exists $methods->{$method}) {
carp "method $method is not known to Net::LastFMAPI"
}
+ elsif (defined $params{page} && !$methods->{$method}->{page}) {
+ carp "method $method is not known to be paginated, but hey"
+ }
sessionise(\%params);
@@ -516,7 +519,9 @@ Does caching. Default cache directory is shown. Good for development.
=head1 PAGINATION
my $iter = lastfm_iter(...);
- my $row = $iter->();
+ while (my $row = $iter->()) {
+ ...
+ }
Will attempt to extract rows from a response, passing you one at a time,
keeping going into the next page, and the next...

0 comments on commit 59e6102

Please sign in to comment.