[Bps-public-commit] r17445 - in Path-Dispatcher/trunk: lib/Path/Dispatcher/Rule
sartak at bestpractical.com
sartak at bestpractical.com
Tue Dec 30 14:21:20 EST 2008
Author: sartak
Date: Tue Dec 30 14:21:19 2008
New Revision: 17445
Modified:
Path-Dispatcher/trunk/ (props changed)
Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule/CodeRef.pm
Log:
r78063 at onn: sartak | 2008-12-30 00:02:56 -0500
On sufficiently high levels, dump CodeRef's matcher attribute too
Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule/CodeRef.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule/CodeRef.pm (original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule/CodeRef.pm Tue Dec 30 14:21:19 2008
@@ -16,6 +16,15 @@
return $self->matcher->($path);
}
+sub readable_attributes {
+ return if $ENV{'PATH_DISPATCHER_TRACE'} < 10;
+
+ my $self = shift;
+
+ require B::Deparse;
+ return B::Deparse->new->coderef2text($self->matcher);
+}
+
__PACKAGE__->meta->make_immutable;
no Moose;
More information about the Bps-public-commit
mailing list