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 / qr.t
... / ...
CommitLineData
1#!perl -X
2
3BEGIN {
4 require Config; import Config;
5 no warnings 'once';
6 if ($Config{'extensions'} !~ /\bData\/Dumper\b/) {
7 print "1..0 # Skip: Data::Dumper was not built\n";
8 exit 0;
9 }
10}
11
12use Test::More tests => 2;
13use Data::Dumper;
14
15{
16 my $q = q| \/ |;
17 use Data::Dumper;
18 my $qr = qr{$q};
19 eval Dumper $qr;
20 ok(!$@, "Dumping $qr with XS") or diag $@, Dumper $qr;
21 local $Data::Dumper::Useperl = 1;
22 eval Dumper $qr;
23 ok(!$@, "Dumping $qr with PP") or diag $@, Dumper $qr;
24}