This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Data::Dumper: Option to avoid building much of the seen hash
[perl5.git] / dist / Data-Dumper / t / terse.t
CommitLineData
d34e9bd9
MS
1#!perl
2use strict;
3use warnings;
4
5use Test::More tests => 2;
6
7use Data::Dumper;
8
9my $hash = { foo => 42 };
10
11for my $useperl (0..1) {
12 my $dumper = Data::Dumper->new([$hash]);
13 $dumper->Terse(1);
14 $dumper->Indent(2);
15 $dumper->Useperl($useperl);
16
17 is $dumper->Dump, <<'WANT', "Terse(1), Indent(2), Useperl($useperl)";
18{
19 'foo' => 42
20}
21WANT
22}