sub _parse_spec {
my ($self, $spec, $nested) = @_;
- return sub { {} } unless length($spec);
+ return match_true() unless length($spec);
for ($_[1]) {
my @match;
PARSE: { do {
our @EXPORT = qw(
match_and match_or match_not match_method match_path match_path_strip
- match_extension match_query match_body match_uploads
+ match_extension match_query match_body match_uploads match_true match_false
);
sub _matcher { bless shift, 'Web::Dispatch::Matcher' }
+sub match_true {
+ _matcher(sub { {} });
+}
+
+sub match_false {
+ _matcher(sub {});
+}
+
sub match_and {
my @match = @_;
_matcher(sub {