mirror of
https://codeberg.org/scip/Config-General.git
synced 2025-12-16 20:21:01 +01:00
2.41
- fixed rt.cpan.org#38635. apache-like include now supports
quoted strings.
- fixed rt.cpan.org#41748. saving config with -tie enabled
now keeps the tie as documented.
- added unit test for -tie. For this to work, a copy of
Tie::LxHash module is delivered with Config::General
source, but will not installed, in fact, it is only
used for 'make test' (number 50)
- fixed rt.cpan.org#39159. documentation of functional interface
now reflects that qw$method) is now required.
- applied patch by AlexK fixing rt.cpan.org#41030:
if files are included by means of a glob pattern having the -IncludeGlob
option activated, paths specified by the -ConfigPath option are being
neglected when trying to spot the files. This patch fixes this
- applied patch by fbicknel, fixes rt.cpan.org#41570:
An array of scalars (eg: option = [1,2,3]) cannot
be used for interpolation (which element shall we use?!), so
we ignore those types of lists and don't build a __stack for them.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@67 be1acefe-a474-0410-9a34-9b3221f2030f
This commit is contained in:
@@ -2,5 +2,5 @@
|
||||
include t/included.conf
|
||||
</bit>
|
||||
<bit two>
|
||||
include t/included.conf
|
||||
include "t/included.conf"
|
||||
</bit>
|
||||
|
||||
25
t/run.t
25
t/run.t
@@ -8,9 +8,16 @@
|
||||
|
||||
|
||||
use Data::Dumper;
|
||||
use Test::More tests => 49;
|
||||
use Test::More tests => 50;
|
||||
#use Test::More qw(no_plan);
|
||||
|
||||
# ahem, we deliver the test code with a local copy of
|
||||
# the Tie::IxHash module so we can do tests on sorted
|
||||
# hashes without dependency to Tie::IxHash.
|
||||
use lib qw(t);
|
||||
use Tie::IxHash;
|
||||
|
||||
|
||||
### 1
|
||||
BEGIN { use_ok "Config::General"};
|
||||
require_ok( 'Config::General' );
|
||||
@@ -615,3 +622,19 @@ if ($got47 =~ /\Q$sorted\E/) {
|
||||
else {
|
||||
fail("Testing sorted save");
|
||||
}
|
||||
|
||||
|
||||
|
||||
tie my %hash48, "Tie::IxHash";
|
||||
my $ostr48 =
|
||||
"zeppelin 1
|
||||
beach 2
|
||||
anathem 3
|
||||
mercury 4\n";
|
||||
my $cfg48 = new Config::General(
|
||||
-String => $ostr48,
|
||||
-Tie => "Tie::IxHash"
|
||||
);
|
||||
%hash48 = $cfg48->getall();
|
||||
my $str48 = $cfg48->save_string(\%hash48);
|
||||
is( $str48, $ostr48, "tied hash test");
|
||||
|
||||
Reference in New Issue
Block a user