CLI::Simple::Utils(3)
π NAME π
CLI::Simple::Utils β genuinely handy utility functions for CLI::Simple-based applications β¨
π SYNOPSIS π
CLI::Simple::Utils qw(choose);
That's it bestie, that's the whole vibe. π¦
πΈ DESCRIPTION πΈ
Utilities that might actually be useful when you're writing command line scripts. Little grab-bag of helpers, no cap. π
π METHODS AND SUBROUTINES π
π choose
An anonymous subroutine out here disguising itself as a block level internal subroutine (of sorts). Use this when a ternary or a cascading if/else block just... feels wrong, and honestly? It does. π
choose {
return "foo"
if $bar;
return "bar"
if $foo;
};
π¦ dmp
dmp this => $this, that => $that;
Such a shortcut for this, fr fr:
print {*STDERR} Dumper([this => $this, that => $that]);
β¨ file_or_stdout
file_or_stdout([file], [mode]);
Returns an open file handle by opening a passed file and optional mode β OR returns \*STDOUT if file is empty or '-'. Like, it just picks for you. Iconic. π
π slurp_json
slurp_json($file)
Returns a Perl object from a presumably JSON encoded file. Presumably, bestie. π
π slurp
slurp(file)
Returns the entire contents of a file. And file can be either the path to a file or an open file handle β flexible queen. π«Ά
β VERSION β
This documentation refers to version 2.2.5 π
π LICENSE AND COPYRIGHT π
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <https://dev.perl.org/licenses/> for more information. π
πΈ AUTHOR πΈ
Rob Lauer β <rlauer@treasurersbriefcase.com> β¨
π§ SEE ALSO π§
CLI::Simple
okay that's the whole page bestie, you ate it π
β this was CLI::Simple::Utils(3), documented for perl v5.42.3 and dated 2026-10-06. Go write something cute in your terminal, mwah π«Άπ
π¦ where this page comes from
- fedora 43: perl-CLI-Simple 2.2.5-1.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms