use strict;
use warnings;
-our $VERSION = "0.08";
+our $VERSION = "0.09";
our @ISA = qw(Exporter);
-our @EXPORT_OK = qw(is_regexp regexp_pattern regmust
- regname regnames
- regnames_count regnames_iterinit regnames_iternext);
+my @XS_FUNCTIONS = qw(regmust);
+my %XS_FUNCTIONS = map { $_ => 1 } @XS_FUNCTIONS;
+our @EXPORT_OK = (@XS_FUNCTIONS,
+ qw(is_regexp regexp_pattern
+ regname regnames regnames_count));
our %EXPORT_OK = map { $_ => 1 } @EXPORT_OK;
# *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING ***
OPTIMISE => 0x000002,
TRIEC => 0x000004,
DUMP => 0x000008,
+ FLAGS => 0x000010,
EXECUTE => 0x00FF00,
INTUIT => 0x000100,
last;
} elsif (exists $bitmask{$s}) {
$bits |= $bitmask{$s};
+ } elsif ($XS_FUNCTIONS{$s}) {
+ _do_install();
+ if (! $installed) {
+ require Carp;
+ Carp::croak("\"re\" function '$s' not available");
+ }
+ require Exporter;
+ re->export_to_level(2, 're', $s);
} elsif ($EXPORT_OK{$s}) {
- _do_install();
require Exporter;
re->export_to_level(2, 're', $s);
} else {
match. If $all is true, then it returns all names defined, if not it returns
only names which were involved in the match.
-=item regnames_iterinit()
-
-Initializes the internal hash iterator associated to the last successful
-matches named capture buffers.
-
-=item regnames_iternext($all)
-
-Gets the next key from the named capture buffer hash associated with the
-last successful match. If $all is true returns the keys of all of the
-distinct named buffers in the pattern, if not returns only those names
-used in the last successful match.
-
=item regnames_count()
Returns the number of distinct names defined in the pattern used