Advanced-Config
view release on metacpan or search on metacpan
date_language was listed in wrong hash.
- Fixed tons of typos in the POD for all *.pm files.
1.13 2025-02-13 08:30:00
- Skipped unlucky release 13.
1.12 2025-02-06 08:30:00
- Fixed typo in POD link in Date.pm.
- Fixed t/70-validate_date_vars.t to handle timestamp test on even slower
running machines. Increased delay allowed from 20 sec to 2 min & modified
test msg to say how close it is. Grabbing the current timestamp during the
test is proving problematic. (Problem is with the test, not the module.)
1.11 2025-01-29 08:30:00
- Fixed t/70-validate_date_vars.t to handle timestamp test on slow running
machines.
- Fixed t/10-validate_simple_cfg.t to properly get the userid for all
platforms.
1.10 2025-01-01 08:30:00
- Fixed so minimum version of 2.08 required for using Fred::Fish::DBUG.
- Updated copyrights to 2024 on all files, both *.PM & t/*.t.
- Fixed t/75-check_all_languages.t to ignore buggy language definitions.
- Fixed t/75-check_all_languages.t & t/76-check_all_languages2.t to
make sure it creates the fish log before it tries to load optional
modules. So the developer tests will find the proper number of
fish files. Also speeded up the test cases.
- Fixed POD NAME on all *.pm files to follow Perl standards.
- Corrected various typos in the POD.
- Updated stale links in the POD.
- Config.pm & Options.pm - Added On/Off to get_boolean() & updated the POD
to say so.
- Config.pm - removed depreciated function section().
- Makefile.PL - Fixed build script bug.
- Fixed to require Fred::Fish::DBUG v2.09 so I could use it's new Test module
in the t/*.t test scripts. Simplified a lot of code.
- Updated copyright to 2025 in all files.
1.09 2020-10-05 08:30:00
- Fixed so minimum version of 2.01 required for using Fred::Fish::DBUG.
- Modified all *.pm files to eliminate the BEGIN logic the older versions
of DBUG required.
- Fixed some POD formatting errors in Options.pm
- Fixed some POD typos in Reader.pm
- Fixed some POD typos in Date.pm
- Fixed 2 digit year bug in parse_date() in Date.pm, parsing two digit years
are still problematic and quite frequently ambiguous.
- More enhancements for parsing 2 & 4 digit year dates in parse_date().
- Added more date tests in t/09-basic_date.t to further test various date
formats.
- Advanced::Config::Options now disallows 2 digit year dates by default
due to the ambiguity involved in trying to parse them. Also updated
the POD to say so in Date.pm & Options.pm.
- Replaced option 'date_disable_yy' with "date_enable_yy" to make the 2 digit
date handling default more intuitive.
- Retired option 'date_reverse_test' in favor of option "date_format" to make
the parsing of numeric dates less ambiguous. Required a reorg of the
arguments to all the parse date functions. Also required to replace arg $up
with $order so we must pick & choose which format to use.
- Fixed t/13-alt-get-tests.t to explicitly use "date_enable_yy => 1"
during all calls to get_date() to allow 2-year dates in the tests!
- Fixed t/t/09-basic_date.t to explicitly allow 2-year dates in it's
tests as well.
lib/Advanced/Config/Date.pm view on Meta::CPAN
in the order specified by I<$order> until it hits something that looks like a
valid date.
(1) YYYYMMDD - ISO
(2) MMDDYYYY - American
(3) DDMMYYYY - European
The I<$order> argument helps deal with ambiguities in the date. Its a comma
separated list of numbers specifying to order to try out. Ex: 3,2,1 means
try out the European date format 1st, then the American date format 2nd, and
finally the ISO format 3rd. You could also just say I<$order> is B<3> and
only accept European dates.
It assumes its using the correct format when the date looks valid. It does this
by validating the B<MM> is between 1 and 12 and that the B<DD> is between 1 and
31. (Using the correct max for that month). And then assumes the year is
always valid.
If I<$skip> is a non-zero value it will skip over the B<ISO> format if it's
listed in I<$order>.
lib/Advanced/Config/Date.pm view on Meta::CPAN
in the order specified by I<$order> until it hits something that looks like a
valid date.
(1) YYMMDD - ISO
(2) MMDDYY - American
(3) DDMMYY - European
The I<$order> argument helps deal with ambiguities in the date. Its a comma
separated list of numbers specifying to order to try out. Ex: 2,3,1 means
try out the American date format 1st, then the European date format 2nd, and
finally the ISO format 3rd. You could also just say I<$order> is B<2> and
only accept European dates.
So if you use the wrong order, more than likely you'll get the wrong date!
It assumes its using the correct format when the date looks valid. It does this
by validating the B<MM> is between 1 and 12 and that the B<DD> is between 1 and
31. (Using the correct max for that month). And then assumes the year is
always valid.
Returns 3 B<undef>'s if nothing looks good.
t/13-alt-get-tests.t view on Meta::CPAN
my @list = $cfg->find_tags ("^special_");
foreach my $tag ( @list ) {
my ($msg1, $msg2);
$get = $cfg->get_value ($tag);
$dir = $cfg->get_directory ($tag, undef, required => 0);
$file = $cfg->get_filename ($tag, undef, required => 0);
# Check what perl has to say about these files/dirs ...
$msg1 = "Special file test (${get}): ";
if ( -f $get ) {
$res = ($file && ! $dir) ? 1 : 0;
$msg2 = "it's a file!";
} elsif ( -d $get ) {
$res = (! $file && $dir) ? 1 : 0;
$msg2 = "it's a directory!";
} else {
$res = (! $file && ! $dir) ? 1 : 0;
$msg2 = "not a file or directory!";
t/config/30-alt_symbol_control.cfg view on Meta::CPAN
# all begin 'section_test_'.
#
# When such tag(s) appear, it's an instruction to compare just that
# one section of the config file to the template. Everything else
# outside that section is ignored.
#
# So if you only have one section to compare, use "section_test_01".
# If you have multiple sections to compare use "section_test_01",
# "section_test_02", etc.
#
# So say section_test_01 = "abc", then it looks up tag "abc" in the
# referenced config file for the name of the section to use. Done like
# this since part of the tests were to use long messy section names
# and this avoided tests failing due to typos.
#
# Please note that sections of the same name are merged together and
# I want to be able to validate that muliple sections map correctly.
#
# ==========================================================================
#
# NOTE: The template file does not use sections! So when compared to a
t/config/40-validate-modifiers.cfg view on Meta::CPAN
# ---------------------------------------------------------------------------
# Gets the list of variables starting with "y" ...
yellow = bass
list1 = ${!y*}
list2 = ${!y@}
# Indirect variable look ups.
bass = is a fish
indirect1 = ${!yellow} # Should say "is a fish"!
indirect2 = ${!YELLOW} # Should say ""!
book = Chapter123
all = ${book%%[0-9]*} # Should be Chapter
# ---------------------------------------------------------------------------
# Search and replace withing a given string ...
# Existing var ${msg}
sub_01 = ${msg/in/by} # Replaces 1st occurance of "in" ...
sub_02 = ${msg//in/by} # Replaces all occurances of "in" ...
( run in 0.628 second using v1.01-cache-2.11-cpan-483215c6ad5 )