This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add B::PMOP::pmregexp
[perl5.git] / ext / B / t / b.t
index fc0ac3f..abffa32 100644 (file)
@@ -340,6 +340,11 @@ SKIP: {
        'different COP->stashoff for different stashes';
 }
 
+my $pmop = B::svref_2object(sub{ qr/fit/ })->ROOT->first->first->sibling;
+$regexp = $pmop->pmregexp;
+is B::class($regexp), 'REGEXP', 'B::PMOP::pmregexp returns a regexp';
+is $regexp->precomp, 'fit', 'pmregexp returns the right regexp';
+
 
 # Test $B::overlay
 {