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
628491b6
AC
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
84386201 12use Test::More tests => 2;
628491b6
AC
13use Data::Dumper;
14
de5ef703 15{
628491b6
AC
16 my $q = q| \/ |;
17 use Data::Dumper;
18 my $qr = qr{$q};
19 eval Dumper $qr;
c7b47164 20 ok(!$@, "Dumping $qr with XS") or diag $@, Dumper $qr;
84386201
FC
21 local $Data::Dumper::Useperl = 1;
22 eval Dumper $qr;
c7b47164 23 ok(!$@, "Dumping $qr with PP") or diag $@, Dumper $qr;
628491b6 24}