7 use DBIx::Class::_Util 'quote_sub';
11 quote_sub '$x = $x . "buh"; $x += 42';
15 is $q->(), 42, 'Expected result after uninit and string/num conversion'
17 qr/Use of uninitialized value/i,
18 qr/isn't numeric in addition/,
19 ], 'Expected warnings, strict did not leak inside the qsub'
22 diag( B::Deparse->new->coderef2text( Sub::Quote::unquote_sub($q) ) )
26 my $no_nothing_q = do {
30 my $n = "Test::Warn::warnings_exist";
31 warn "-->@{[ *{$n}{CODE} ]}<--\n";
32 warn "-->@{[ ${^WARNING_BITS} || '' ]}<--\n";
36 my $we_cref = Test::Warn->can('warnings_exist');
38 warnings_exist { $no_nothing_q->() } [
39 qr/^\Q-->$we_cref<--\E$/m,
40 qr/^\-\-\>\0*\<\-\-$/m, # some perls have a string of nulls, some just an empty string
41 ], 'Expected warnings, strict did not leak inside the qsub'
44 diag( B::Deparse->new->coderef2text( Sub::Quote::unquote_sub($no_nothing_q) ) )