Data-TagHive
view release on metacpan or search on metacpan
lib/Data/TagHive.pm view on Meta::CPAN
#pod book.topic
#pod book.topic:programming
#pod book.topic:programming.perl
#pod book.topic:programming.perl.cpan
#pod
#pod =cut
sub new {
my ($class) = @_;
return bless { state => {} } => $class;
}
my $tagname_re = qr{ [a-z] [-a-z0-9_]* }x;
my $tagvalue_re = qr{ [-a-z0-9_]+ }x;
my $tagpair_re = qr{ $tagname_re (?::$tagvalue_re)? }x;
my $tagstr_re = qr{ \A $tagpair_re (?:\.$tagpair_re)* \z }x;
sub _assert_tagstr {
my ($self, $tagstr) = @_;
croak "invalid tagstr <$tagstr>" unless $tagstr =~ $tagstr_re;
( run in 0.245 second using v1.01-cache-2.11-cpan-454fe037f31 )