1 2 3 4 5 6 7 8
my $images = Mojo::Collection->new; while (defined $url) { my $images = $c->app->ua->get($url)->res->dom->find('img')->tap(sub { push @{$images}, $_; }); undef $url if $images->size < $images_per_page; } $images = $images->flatten;
1
Can't locate object method "new" via package "Mojo::Collection" (perhaps you forgot to load "Mojo::Collection"?) at line 1.