package Tie::Hash::NamedCapture;
our $VERSION = "0.06";
# The real meat implemented in XS in universal.c in the core, but this
# method was left behind because gv.c expects a Purl-Perl method in
# this package when it loads the tie magic for %+ and %-
my ($one, $all) = Tie::Hash::NamedCapture::flags();
sub TIEHASH {
my ($pkg, %arg) = @_;
my $flag = $arg{all} ? $all : $one;
bless \$flag => $pkg;
}
tie %+, __PACKAGE__;
tie %-, __PACKAGE__, all => 1;
1;
__END__
=head1 NAME
Tie::Hash::NamedCapture - Named regexp capture buffers
=head1 SYNOPSIS
tie my %hash, "Tie::Hash::NamedCapture";
# %hash now behaves like %+
tie my %hash, "Tie::Hash::NamedCapture", all => 1;
# %hash now access buffers from regexp in $qr like %-
=head1 DESCRIPTION
This module is used to implement the special hashes C<%+> and C<%->, but it
can be used to tie other variables as you choose.
When the C