projects
/
scpubgit/Tak.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
d69045f
)
add clone method
Matt S Trout [Tue, 29 Nov 2011 21:34:57 +0000 (21:34 +0000)]
lib/Tak/Router.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Tak/Router.pm
b/lib/Tak/Router.pm
index
5c2502b
..
a8b071c
100644
(file)
--- a/
lib/Tak/Router.pm
+++ b/
lib/Tak/Router.pm
@@
-42,4
+42,11
@@
sub deregister {
delete $self->services->{$name}
}
+sub clone {
+ my ($self) = @_;
+ my $new = (ref $self)->new(services => $self->services);
+ $new->register(meta => Tak::MetaService->new(router => $new));
+ $new;
+}
+
1;