[perl-ExtUtils-Depends] $Data::Dumper::Terse set to 1 broke save_config. Test & fix.
- From: Brian Manning <bmanning src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-ExtUtils-Depends] $Data::Dumper::Terse set to 1 broke save_config. Test & fix.
- Date: Tue, 29 Apr 2014 05:51:51 +0000 (UTC)
commit 3a9fa6bed3ae16be5d4f6cf9531bd65c6c5909f9
Author: Ed J <m8r-35s8eo mailinator com>
Date: Sun Apr 13 01:54:34 2014 +0100
$Data::Dumper::Terse set to 1 broke save_config. Test & fix.
lib/ExtUtils/Depends.pm | 1 +
t/02_save_load.t | 10 ++++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/lib/ExtUtils/Depends.pm b/lib/ExtUtils/Depends.pm
index 05ef316..5431839 100644
--- a/lib/ExtUtils/Depends.pm
+++ b/lib/ExtUtils/Depends.pm
@@ -112,6 +112,7 @@ sub install {
sub save_config {
use Data::Dumper;
+ local $Data::Dumper::Terse = 0;
use IO::File;
my ($self, $filename) = @_;
diff --git a/t/02_save_load.t b/t/02_save_load.t
index 9d50572..5392d7b 100644
--- a/t/02_save_load.t
+++ b/t/02_save_load.t
@@ -40,6 +40,8 @@ my @installed_files = qw(dep.h
dep-private.h);
$dep_info->install (@installed_files);
+use Data::Dumper;
+$Data::Dumper::Terse = 1;
$dep_info->save_config (catfile $tmp_inc, qw(DepTest Install Files.pm));
# --------------------------------------------------------------------------- #
@@ -75,9 +77,13 @@ my $info = ExtUtils::Depends::load ('DepTest');
my $install_part = qr|DepTest.Install|;
like ($info->{inc}, $install_part);
-ok (-1 != index $info->{inc}, $inc);
+isnt (index($info->{inc}, $inc), -1);
-isa_ok ($info->{typemaps}, 'ARRAY');
+is_deeply (
+ [ map { my $t = $_; $t =~ s#.*DepTest/Install/##; $t } @{$info->{typemaps}} ],
+ [ map { my $t = $_; $t =~ s#build/##; $t } @typemaps ],
+ 'check typemaps actually saved/loaded'
+);
like ($info->{instpath}, $install_part);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]