-
-
16 Oct 2020 09:53:18 UTC
- Distribution: MooX-HandlesVia
- Module version: 0.001009
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (0)
- Testers (3337 / 0 / 0)
- Kwalitee
Bus factor: 1- 91.03% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (24.17KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- NAME
- VERSION
- SYNOPSIS
- DESCRIPTION
- DIFFERENCES IN FUNCTIONALITY
- SEE ALSO
- AUTHOR
- COPYRIGHT AND LICENSE
NAME
Data::Perl::Collection::Array::MooseLike - Collection::Array subclass that simulates Moose's native traits.
VERSION
version 0.001009
SYNOPSIS
use Data::Perl::Collection::Array::MooseLike; my $array = Data::Perl::Collection::Array::MooseLike->new(qw/a b c d/); my $scalar_context = $array->splice(0, 2); # removes and returns b my @list_context = $array->splice(0, 2); # returns and removes (b, c)
DESCRIPTION
This class provides a wrapper and methods for interacting with an array. All methods are written to emulate/match existing behavior that exists with Moose's native traits.
DIFFERENCES IN FUNCTIONALITY
- splice($args, ...)
-
Just like Perl's builtin splice. In scalar context, this returns the last element removed, or undef if no elements were removed. In list context, this returns all the elements removed from the array.
This method requires at least one argument.
SEE ALSO
AUTHOR
Toby Inkster <tobyink@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Matthew Phillips <mattp@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install MooX::HandlesVia, copy and paste the appropriate command in to your terminal.
cpanm MooX::HandlesVia
perl -MCPAN -e shell install MooX::HandlesVia
For more information on module installation, please visit the detailed CPAN module installation guide.