Scroll to navigation

SHARYANTO::Array::Util(3pm) User Contributed Perl Documentation SHARYANTO::Array::Util(3pm)
 

NAME

SHARYANTO::Array::Util - Array-related utilities

VERSION

version 0.67

SYNOPSIS

DESCRIPTION

FUNCTIONS

match_array_or_regex(@args) -> any

Check whether an item matches (list of) values/regexes.
Examples:
 match_array_or_regex(haystack => ["abc", "abd"], needle => "abc"); # -> 1
 match_array_or_regex(haystack => qr/ab./, needle => "abc"); # -> 1
 match_array_or_regex(haystack => [qr/ab./, "abd"], needle => "abc"); # -> 1
This routine can be used to match an item against a regex or a list of
strings/regexes, e.g. when matching against an ACL.
Arguments ('*' denotes required arguments):
haystack* => any
Check whether an item matches (list of) values/regexes.
This routine can be used to match an item against a regex or a list of strings/regexes, e.g. when matching against an ACL.
needle* => str
Check whether an item matches (list of) values/regexes.
This routine can be used to match an item against a regex or a list of strings/regexes, e.g. when matching against an ACL.
Return value:

match_regex_or_array(@args) -> any

Alias for match_array_or_regex.
Examples:
 match_regex_or_array(haystack => ["abc", "abd"], needle => "abc"); # -> 1
 match_regex_or_array(haystack => qr/ab./, needle => "abc"); # -> 1
 match_regex_or_array(haystack => [qr/ab./, "abd"], needle => "abc"); # -> 1
This routine can be used to match an item against a regex or a list of
strings/regexes, e.g. when matching against an ACL.
Arguments ('*' denotes required arguments):
haystack* => any
Alias for match_array_or_regex.
This routine can be used to match an item against a regex or a list of strings/regexes, e.g. when matching against an ACL.
needle* => str
Alias for match_array_or_regex.
This routine can be used to match an item against a regex or a list of strings/regexes, e.g. when matching against an ACL.
Return value:

SEE ALSO

SHARYANTO

HOMEPAGE

Please visit the project's homepage at <https://metacpan.org/release/SHARYANTO-Utils>.

SOURCE

Source repository is at <https://github.com/sharyanto/perl-SHARYANTO-Utils>.

BUGS

Please report any bugs or feature requests on the bugtracker website <https://rt.cpan.org/Public/Dist/Display.html?Name=SHARYANTO-Utils>
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Steven Haryanto <stevenharyanto@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Steven Haryanto.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
2014-01-09 perl v5.18.2