Syntax:...Junction(3)

okay so welcome to the Syntax:...Junction(3) page, bestie β€” it's part of the User Contributed Perl Documentation and it's here to explain Syntax::Feature::Junction, no cap πŸ’…βœ¨

🌸 NAME 🌸

Syntax::Feature::Junction β€” Provide keywords for any, all, none, or one πŸŽ€

✨ SYNOPSIS ✨

okay so the whole vibe is: you pull in the syntax sugar and suddenly these keywords are doing main character things. Here's the iconic lineup, fr fr:

       use syntax 'junction';

       if (any(@grant) eq 'su') {
         ...
       }

       if (all($foo, $bar) >= 10) {
         ...
       }

       if (qr/^\d+$/ == all(@answers)) {
         ...
       }

       if (all(@input) <= @limits) {
         ...
       }

       if (none(@pass) eq 'password') {
         ...
       }

       if (one(@answer) == 42) {
         ...
       }

or if you want to rename an export, use Sub::Exporter options:

       use syntax 'junction' => {
         any => { -as => 'robot_any' }
       };

       if (robot_any(@grant) eq 'su') {
         ...
       }

The full documentation for this module is in Syntax::Keyword::Junction. This is just a way to use the sugar that syntax gives us πŸ“


πŸ’€ BUGS πŸ’€

Please report any bugs or feature requests on the bugtracker website https://github.com/haarg/Syntax-Keyword-Junction/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. iykyk, receipts help πŸ’–

πŸ‘‘ AUTHORS πŸ‘‘

  • Arthur Axel "fREW" Schmidt frioux+cpan@gmail.com ✨
  • Carl Franks 🌈

This software is copyright (c) 2024 by Arthur Axel "fREW" Schmidt. πŸ‘‘

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. πŸ’œ


mwah πŸ’‹ this page is from perl v5.42.0, dated 2024-08-21, and yes bestie it's still the Syntax:...Junction(3) page β€” bye! πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from