re-engine-RE2
view release on metacpan or search on metacpan
lib/re/engine/RE2.pm view on Meta::CPAN
1718192021222324252627282930313233343536373839404142434445464748sub
import
{
my
$class
=
shift
;
$^H{regcomp} = ENGINE;
if
(
@_
) {
my
%args
=
@_
;
if
(
exists
$args
{
"-max_mem"
}) {
$^H{__PACKAGE__ .
"::max-mem"
} =
$args
{
"-max_mem"
};
}
if
(
exists
$args
{
"-strict"
}) {
$^H{__PACKAGE__ .
"::strict"
} =
$args
{
"-strict"
};
}
if
(
exists
$args
{
"-longest_match"
}) {
$^H{__PACKAGE__ .
"::longest-match"
} =
$args
{
"-longest_match"
};
}
if
(
exists
$args
{
"-never_nl"
}) {
$^H{__PACKAGE__ .
"::never-nl"
} =
$args
{
"-never_nl"
};
}
}
}
sub
unimport
{
delete
$^H{regcomp}
if
$^H{regcomp} == ENGINE;
}
( run in 1.199 second using v1.01-cache-2.11-cpan-49f99fa48dc )