Jens Rehsack > List-MoreUtils-0.400_003 > List::MoreUtils::Impl::Modern

Download:
List-MoreUtils-0.400_003.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

New  30
Open  25
View/Report Bugs
Module Version: 0.400_003   Source   Latest Release: List-MoreUtils-0.400_005

NAME ^

List::MoreUtils::Impl::Modern - Provide List::MoreUtils implementation from List::Util

SYNOPSIS ^

  use List::MoreUtils qw(:modern);

FUNCTIONS ^

any BLOCK LIST

Returns a true value if any item in LIST meets the criterion given through BLOCK. Sets $_ for each item in LIST in turn:

  print "At least one value undefined"
    if any { ! defined($_) } @list;

Returns false otherwise, or if LIST is empty.

The behaviour without LIST needs to be discussed!

all BLOCK LIST

Returns a true value if all items in LIST meet the criterion given through BLOCK, or if LIST is empty. Sets $_ for each item in LIST in turn:

  print "All items defined"
    if all { defined($_) } @list;

Returns false otherwise.

none BLOCK LIST

Logically the negation of any. Returns a true value if no item in LIST meets the criterion given through BLOCK, or if LIST is empty. Sets $_ for each item in LIST in turn:

  print "No value defined"
    if none { defined($_) } @list;

Returns false otherwise.

notall BLOCK LIST

Logically the negation of all. Returns a true value if not all items in LIST meet the criterion given through BLOCK. Sets $_ for each item in LIST in turn:

  print "Not all values defined"
    if notall { defined($_) } @list;

Returns false otherwise, or if LIST is empty.

SEE ALSO ^

List::Util

AUTHOR ^

Jens Rehsack <rehsack AT cpan.org>

Adam Kennedy <adamk@cpan.org>

Tassilo von Parseval <tassilo.von.parseval@rwth-aachen.de>

COPYRIGHT AND LICENSE ^

Some parts copyright 2011 Aaron Crane.

Copyright 2004 - 2010 by Tassilo von Parseval Copyright 2013 by Jens Rehsack

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: