This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add B::PMOP::pmregexp
[perl5.git]
/
ext
/
B
/
t
/
b.t
diff --git
a/ext/B/t/b.t
b/ext/B/t/b.t
index
fc0ac3f
..
abffa32
100644
(file)
--- a/
ext/B/t/b.t
+++ b/
ext/B/t/b.t
@@
-340,6
+340,11
@@
SKIP: {
'different COP->stashoff for different stashes';
}
'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
{
# Test $B::overlay
{