logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

autobox::Junctions - Autoboxified junction-style operators

Author

       Chris Weyl <cweyl@alumni.drew.edu>

   I'mamaterialboyinamaterialworld
       Please  note  Idonotexpecttobegittip'edorflattr'edforthiswork, rather itissimplyaverypleasantsurprise. I largely create and release works like  this  because  I  need  them  or  I  find  it
       enjoyable; however, don't let that stop you if you feel like it ;)

       Flattr
       <https://flattr.com/submit/auto?user_id=RsrchBoy&url=https%3A%2F%2Fgithub.com%2FRsrchBoy%2Fautobox-
       Junctions&title=RsrchBoy's%20CPAN%20autobox-Junctions&tags=%22RsrchBoy's%20autobox-
       Junctions%20in%20the%20CPAN%22>, Gratipay <https://gratipay.com/RsrchBoy/>, or indulge my Amazon Wishlist
       <http://bit.ly/rsrchboys-wishlist>...  If and *only* if you so desire.

Autoboxed Methods

       See: "any" in Syntax::Keyword::Junction, "all" in Syntax::Keyword::Junction, "one" in
       Syntax::Keyword::Junction, and "none" in Syntax::Keyword::Junction.

Bugs

       Please     report     any     bugs     or     feature     requests     on    the    bugtracker    website
       https://github.com/RsrchBoy/autobox-Junctions/issues

       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.

Contributor

       Сергей Романов <sromanov-dev@yandex.ru>

Description

       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.

Name

       autobox::Junctions - Autoboxified junction-style operators

See Also

       Please see those modules/websites for more information related to this module.

       •   Syntax::Keyword::Junction

       •   autobox

Synopsis

           # 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 hunter
               ether => 'disarming smile', # Canadian
               jnap  => '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.

See Also