Overload to stringify correctly
[catagits/Catalyst-Runtime.git] / lib / Catalyst / ActionContainer.pm
index ee7cfa7..ca36862 100644 (file)
@@ -17,6 +17,13 @@ to represent the various dispatch points in your application.
 
 use Moose;
 
+use overload (
+
+    # Stringify to path part for tree search
+    q{""} => sub { shift->part },
+
+);
+
 has part    => (is => 'rw', required => 1, lazy => 1, default => sub { {} });
 has actions => (is => 'rw', required => 1, lazy => 1, default => sub { {} });