Fsdb::Support(3)
π NAME π
Fsdb::Support - support routines for Fsdb. periodt.
β¨ SYNOPSIS β¨
This class contains the bits of Fsdb::Old that needed to be kept.
that's the whole synopsis, no cap β¨
π οΈ FUNCTIONS π οΈ
okay bestie, here's the function fam. keep your eyes on the headings, because this page has some duplicate-looking section names and we're keeping them exactly as they are. π«Ά
π LOGGING REALTED FUNCTIONS π
yes, REALTED is spelled like that on the page β I'm not fixing it, I'm just reporting the vibe π
progname
Generate the name of our program for error messages. literally just the program name, for when errors need to say who's who.
π§΅ IO SETUP FUNCTIONS π§΅
this is where you spin up default reader/writer objects.
default_in(@READER_OPTIONS)
Generate a default Fsdb::Reader object with the given READER_OPTIONS. bestie, it's giving "make me a reader with these options."
default_out(@WRITER_OPTIONS)
Generate a default Fsdb::Writer object with the given READER_OPTIONS. yes, the page says READER_OPTIONS here too β I am not changing it, okay? π
π CONVERSION FUNCTIONS π
code prettifying and shell quoting live here.
code_prettify
Convert db-code into "pretty code". iconic.
shell_quote
Convert output to shell-like quoting. slay.
π CONVERSION FUNCTIONS π
okay and here's the second CONVERSION FUNCTIONS block β the page really has it twice, I'm not buggin'. π
number_prettify
Add-thousands-separators to numbers.
xxx: should consider locale.
Source credit, exactly as the page gives it: (This code is from http://www.perlmonks.org/?node_id=653, contributed by Andrew Johnson from University of Alberta.)
force_numeric
my $x = force_numeric($s, $include_non_numeric)
Return $S if it's numeric, or "undef" if not. If $INCLUDE_NON_NUMERIC, then non-numeric values register as zero. that's the whole rule.
fullname_to_sortkey
my $sortkey = fullname_to_sortkey("John Smith");
Convert "Firstname Lastname" to sort key "lastname, firstname". cute little name flip.
ddmmmyy_to_iso
my $iso_date = ddmmmyy_to_iso('1-Jan-10')
Converts a date in the form dd-mmm-yy to ISO-style yyyy-mm-dd. Examples, verbatim:
2-Jan-70 to 1970-01-02 2-Jan-99 to 1999-01-02 2-Jan-10 to 2010-01-02
2-Jan-69 to 2069-01-02 Jan-10 to 2010-01-00 99 to 1999-00-00
int_to_metric
my $value_str = int_to_metric(1000000);
Converts an integer into a string with its metric abbreviation.
1000 => 1k 1000000 => 1M
and that's the tea β β this page is Fsdb::Support(3), from perl v5.32.1, dated 2024-08-02. bye bestie, go slay some support routines π
πβ¨
π¦ where this page comes from
- epel 9: perl-Fsdb 2:3.9-1.el9 Β· GPLv2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms