my $urinals = Acme::Urinal->new(8);
say $urinal->pick_one; # prints 1
First problem is that the variable being printed should be plural rather than singular. Second issue is that pick_one() returns a 3 element array, so following the example the output looks more like:
115
335
555
774
222
442
662
001
I would have sent a pull request, but it's not clear to me what the best way is to change the SYNOPSIS.
Also, would be helpful if the repo were in the metadata. :)
I can send you a quick PR if you have an opinion on how to best update the example. Maybe something like
use feature qw( say );
use Acme::Urinal;
my $urinals = Acme::Urinal->new(8);
for ( 0 .. 8 ) {
my ( $index, $resource, $comfort_level ) = $urinals->pick_one;
say $index;
}
prints:
1
3
5
7
2
4
6
0
Use of uninitialized value $index in say at bar.pl line 11.
Hi Sterling!
First problem is that the variable being printed should be plural rather than singular. Second issue is that
pick_one()
returns a 3 element array, so following the example the output looks more like:I would have sent a pull request, but it's not clear to me what the best way is to change the SYNOPSIS.
Also, would be helpful if the repo were in the metadata. :)
I can send you a quick PR if you have an opinion on how to best update the example. Maybe something like