X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/d04ff51e6b5e54b835a6e38cc4037da588963d3b..dba3f186d8c869e7d758c2fbacce9612063a3e15:/ext/re/re.pm diff --git a/ext/re/re.pm b/ext/re/re.pm index d4c4ac1..c9ea580 100644 --- a/ext/re/re.pm +++ b/ext/re/re.pm @@ -184,9 +184,9 @@ Enable DUMP and all execute options. Equivelent to: Enable TRIE_MORE and all execute compile and execute options. -=back 4 +=back -=back 4 +=back The directive C and its equivalents are I lexically scoped, as the other directives are. They have both compile-time and run-time @@ -260,15 +260,16 @@ sub _load_unload { } if ( ! $installed ) { die "'re' not installed!? ($installed_error)"; - } else { - # We could just say = $installed; but then we wouldn't - # "see" any changes to the color environment var. - - # install() returns an integer, which if casted properly - # in C resolves to a structure containing the regex - # hooks. Setting it to a random integer will guarantee - # segfaults. - $^H{regcomp} = install(); + } else { + # We call install() every time, as if we didn't, we wouldn't + # "see" any changes to the color environment var since + # the last time it was called. + + # install() returns an integer, which if casted properly + # in C resolves to a structure containing the regex + # hooks. Setting it to a random integer will guarantee + # segfaults. + $^H{regcomp} = install(); } } else { delete $^H{regcomp};