The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

re::engine::PCR - Pugs::Compiler::Rule regex engine

SYNOPSIS

    use 5.10;
    use re::engine::PCR;

    if ("abc" =~ q/((.).)./) {
        say ${^MATCH};           # "abc"
        say ${^MATCH}->from;     # 0
        say ${^MATCH}->to;       # 3
        say ${^MATCH}->[0];      # "ab"
        say $1;                  # "ab" (same as above)
        say ${^MATCH}->[0][0];   # "a"
        say $1->[0];             # "a"  (same as above)
    }

DESCRIPTION

Replaces the perl regular expression engine in a given lexical scope with the engine provided by Pugs::Compiler::Rule.

CAVEATS

Although $& is more succinct than ${^MATCH} using the former (along with $` and $') imposes a considerable performance penalty on all regular expression matches, so don't do that.

TODO

BUGS

Please report any bugs that aren't already listed at http://rt.cpan.org/Dist/Display.html?Queue=re-engine-PCR to http://rt.cpan.org/Public/Bug/Report.html?Queue=re-engine-PCR

AUTHOR

Ævar Arnfjörð Bjarmason <avar@cpan.org>

LICENSE

Copyright 2007 Ævar Arnfjörð Bjarmason.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.