NAME
Data::Rx::Type::PCRE - PCRE string checking for Rx (experimental)
VERSION
version 0.005
SYNOPSIS
use Data::Rx;
use Data::Rx::Type::PCRE;
my $rx = Data::Rx->new({
type_plugins => [ 'Data::Rx::Type::PCRE' ]
});
my $ph_number = $rx->make_schema({
type => 'tag:rjbs.manxome.org,2008-10-04:rx/pcre/str',
regex => q/\A867-[5309]{4}\z/,
});
DESCRIPTION
This provides a new type, currently known as tag:rjbs.manxome.org,2008-10-04:rx/pcre/str
, which checks strings against the Perl-compatible regular expression library. Note! This uses PCRE, not Perl's regular expressions. There are differences, but very few.
Schema definitions must have a regex
parameter, which provides the regular expression as a string. They may also have a flags
parameter, which provides regular expression flags to be passed to the (?i-i)
style flag modifier.
WARNING
This plugin is still pretty experimental. When it's less so, it may get a new type URI. Its interface may change between now and then.
AUTHOR
Ricardo SIGNES <rjbs@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.