App::CELL::Util(3pm)

πŸ“¦
version 0.231 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute

✨ NAME ✨

App::CELL::Util β€” bestie, it's a grab-bag of generalized, reuseable functions 🫢 the little Swiss Army knife of a Perl module, no cap πŸ’…


🌸 SYNOPSIS 🌸

okay so here's the vibe check on how you actually use it πŸ‘‡

use App::CELL::Util qw( utc_timestamp is_directory_viable );

# utc_timestamp
print "UTC time is " . utc_timestamp() . "\n";

# is_directory_viable
my $status = is_directory_viable( $dir_foo );
print "$dir_foo is a viable directory" if $status->ok;
if ( $status->not_ok ) {
    my $problem = $status->payload;
    print "$dir_foo is not viable because $problem\n";
}

like, you pull in the two functions you want, you ask for the UTC timestamp, you check if a directory is viable and you check ->ok / ->not_ok on the status object πŸŽ€ and if it's not_ok, the ->payload tells you why. chef's kiss πŸ’–


πŸ¦‹ EXPORTS πŸ¦‹

This module provides the following public functions β€” these are the ones you can actually ask for, bestie:

  • is_directory_viable
  • stringify_args
  • utc_timestamp

periodt. that's the whole roster πŸ‘‘


πŸ’œ PACKAGE VARIABLES πŸ’œ

(yeah, this section exists. it's giving mysterious. moving on πŸ’€)


πŸ”₯ FUNCTIONS πŸ”₯

🌈 is_directory_viable

Run viability checks on a directory. Takes: full path to directory. Returns: true (directory viable) or false (directory not viable). If the directory is not viable, it sets the package variable $App::CELL::Util::not_viable_reason.

so basically you hand it a full path, it does its little checks, and you get a true/false back 🫢 and when the answer is no, it drops the tea into that package variable $App::CELL::Util::not_viable_reason so you know exactly what went wrong. lowkey the most useful thing ever for error reporting πŸ’…

πŸ“ stringify_args

Convert args (or any data structure) into a string β€” useful for error reporting.

literally: hand it args, or honestly any data structure, and it hands you back a string πŸŽ€ perfect for when you're throwing an error and you need to show what the heck got passed in. main character debugging energy ✨

🧚 utc_timestamp

bestie, the docs give us the name and... that's it. no description. iconic minimalism, we love a mystery πŸ’€

and that's the whole page!! this one's from App::CELL::Util(3pm), living under perl v5.34.0, dated 2022-07-17 β€” user contributed Perl documentation, as a lil treat 🌸 thanks for reading, mwah, go be viable πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from