autobox::Junctions3pm
Autoboxified junction-style operators
Usage
# somewhere above...use autobox::Junctions;# somewhere below...my @explodey = qw{ bing bang boom };warn "boom!\n"if @explody->any eq 'boom';my $still_explody = [ @explodey ];warn "not all explody\n"unless $still_explody->all eq 'boom';# now, bonus points...use autobox::Core;my $weapons = {mateu => 'bow & arrow', # fearsome hunterether => 'disarming smile', # Canadianjnap => 'shotgun', # upstate NY};warn 'mateu is armed!'if $weapons->keys->any eq 'mateu'warn '...but at least no one has a nuke'if $weapons->values->none eq 'nuke';
Version
This document describes version 0.002 of autobox::Junctions - released June 22, 2016 as part of autobox-Junctions.
Overview
This is a simple autoboxifying wrapper around Syntax::Keyword::Junction, that provides array and array references with the functions provided by that package as methods for arrays: any, all, one, and none.
Autoboxed methods
See: "any" in Syntax::Keyword::Junction, "all" in Syntax::Keyword::Junction, "one" in Syntax::Keyword::Junction, and "none" in Syntax::Keyword::Junction.
Contributor
Сергей Романов <[email protected]>
Copyright and license
This software is Copyright (c) 2013 by Chris Weyl.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
Releases
6 releases since Debian 8 (Jessie); the text changed 2 times.