[libbread-board-perl] 26/66: turn this into a deprecation warning
Jonas Smedegaard
js at alioth.debian.org
Sun Sep 29 21:23:34 UTC 2013
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository libbread-board-perl.
commit dfd0339f882c99af8a8243632d435c1deb81d508
Author: Jesse Luehrs <doy at tozt.net>
Date: Sun Dec 30 10:31:33 2012 -0600
turn this into a deprecation warning
---
lib/Bread/Board/Traversable.pm | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/lib/Bread/Board/Traversable.pm b/lib/Bread/Board/Traversable.pm
index 20dcdbc..8c9c783 100644
--- a/lib/Bread/Board/Traversable.pm
+++ b/lib/Bread/Board/Traversable.pm
@@ -82,7 +82,19 @@ sub _get_container_or_service {
# get_sub_container and get_service is implemented in Container
# there must be a better way to do this
- if ($c->isa('Bread::Board::Container')) {
+ if ($c->does('Bread::Board::Service')) {
+ if ($c->name eq $name) {
+ warn "Traversing into the current service ($name) is deprecated."
+ . " You should remove the $name component from the path.";
+ return $c;
+ }
+ }
+ elsif ($c->isa('Bread::Board::Container')) {
+ if ($c->name eq $name) {
+ warn "Traversing into the current container ($name) is deprecated;"
+ . " you should remove the $name component from the path";
+ return $c;
+ }
return $c->get_sub_container($name) if $c->has_sub_container($name);
return $c->get_service($name) if $c->has_service($name);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libbread-board-perl.git
More information about the Pkg-perl-cvs-commits
mailing list