GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Data::Perl::Collection::Array::MooseLike(3) User Contributed Perl Documentation Data::Perl::Collection::Array::MooseLike(3)

Data::Perl::Collection::Array::MooseLike - Collection::Array subclass that simulates Moose's native traits.

version 0.001009

  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)

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.

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.

  • Data::Perl
  • Data::Perl::Role::Collection::Array

Toby Inkster <tobyink@cpan.org>

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.

2020-10-16 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.