Fsdb::Support - support routines for Fsdb
This class contains the bits of Fsdb::Old that needed to be kept.
Generate the name of our program for error messages.
Generate a default Fsdb::Reader object with the given READER_OPTIONS
Generate a default Fsdb::Writer object with the given READER_OPTIONS
Convert db-code into "pretty code".
Convert output to shell-like quoting
Add-thousands-separators to numbers.
xxx: should consider locale.
(This code is from http://www.perlmonks.org/?node_id=653, contributed by Andrew Johnson from University of Alberta.)
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.
$S
undef
$INCLUDE_NON_NUMERIC
my $sortkey = fullname_to_sortkey("John Smith");
Convert "Firstname Lastname" to sort key "lastname, firstname".
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:
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
my $value_str = int_to_metric(1000000);
Converts an integer into a string with its metric abbreviation.
1000 => 1k 1000000 => 1M
To install Fsdb, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Fsdb
CPAN shell
perl -MCPAN -e shell install Fsdb
For more information on module installation, please visit the detailed CPAN module installation guide.