Name

SPVM::Mojo::Collection - Collection

Description

Mojo::Collection class in SPVM is an array-based container for collections.

Usage

use Mojo::Collection;

my $collection = Mojo::Collection->new(["just", "works"]);

Details

SPVM's Mojo::Colletion is just a child class of List different from Perl's Mojo::Collection.

This is because currently we want to add methods freely to List class without conflicting with Mojo::Collection.

Super Class

List

Class Methods

new

static method new : Mojo::Collection ($array : object[] = undef, $capacity : int = -1);

Same as List#new method except for the return value.

See Also

Copyright & License

Copyright (c) 2025 Yuki Kimoto

MIT License