Skip to content

Commit

Permalink
release/recent: fix warnings + page_size
Browse files Browse the repository at this point in the history
Some internal values are incorrect due to lack of defaults.
This caused `page_size` not to work when not combined with `page`
  • Loading branch information
mickeyn committed Aug 28, 2023
1 parent 7a0350e commit ec70c90
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/MetaCPAN/Query/Release.pm
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,10 @@ sub _get_depended_releases {

sub recent {
my ( $self, $page, $page_size, $type ) = @_;
$page //= 1;
$page_size //= 10000;
$type //= '';

my $query;
my $from = ( $page - 1 ) * $page_size;

Expand Down

0 comments on commit ec70c90

Please sign in to comment.