[Bps-public-commit] r16387 - in Path-Dispatcher/trunk: lib/Path/Dispatcher/Rule
sartak at bestpractical.com
sartak at bestpractical.com
Mon Oct 20 07:13:54 EDT 2008
Author: sartak
Date: Mon Oct 20 07:13:54 2008
New Revision: 16387
Modified:
Path-Dispatcher/trunk/ (props changed)
Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule/Regex.pm
Log:
r74175 at onn: sartak | 2008-10-20 07:13:47 -0400
Rule::Regex doc
Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule/Regex.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule/Regex.pm (original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule/Regex.pm Mon Oct 20 07:13:54 2008
@@ -31,3 +31,32 @@
1;
+__END__
+
+=head1 NAME
+
+Path::Dispatcher::Rule::Regex - predicate is a regular expression
+
+=head1 SYNOPSIS
+
+ my $rule = Path::Dispatcher::Rule::Regex->new(
+ regex => qr{^/comment(s?)/(\d+)$},
+ block => sub { display_comment($2) },
+ );
+
+=head1 DESCRIPTION
+
+Rules of this class use a regular expression to match against the path.
+
+=head1 ATTRIBUTES
+
+=head2 regex
+
+The regular expression to match against the path. It works just as you'd expect!
+
+The results are the capture variables (C<$1>, C<$2>, etc) and when the
+resulting L<Path::Dispatcher::Match> is executed, the codeblock will see these
+values. C<$`>, C<$&>, and C<$'> are not (yet) restored.
+
+=cut
+
More information about the Bps-public-commit
mailing list