[libbread-board-perl] 57/66: docs

Jonas Smedegaard js at alioth.debian.org
Sun Sep 29 21:23:40 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 be2ca3d8fe54829a177d9b3f6acc9b7154101adb
Author: Jesse Luehrs <doy at tozt.net>
Date:   Fri Aug 30 13:36:48 2013 -0400

    docs
---
 lib/Bread/Board.pm |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/lib/Bread/Board.pm b/lib/Bread/Board.pm
index df77161..b915d8b 100644
--- a/lib/Bread/Board.pm
+++ b/lib/Bread/Board.pm
@@ -365,6 +365,10 @@ For example,
       );
   };
 
+If C<$name> starts with C<'+'>, and the container is being declared inside
+another container, then this declaration will instead extend an existing
+container with the name C<$name> (without the C<'+'>).
+
 =item I<container ($container_instance, &body)>
 
 In many cases, subclassing L<Bread::Board::Container> is the easiest route to
@@ -441,6 +445,16 @@ of these is present, constructor injection will be used with
 L<Bread::Board::ConstructorInjection> (and you must provide the C<class>
 option).
 
+If the C<$name> starts with a C<'+'>, the service definition will instead
+extend an existing service with the given C<$name> (without the C<'+'>). This
+works similarly to the C<has '+foo'> syntax in Moose. It is most useful when
+defining a container class where the container is built up in C<BUILD> methods,
+as each class in the inheritance hierarchy can modify services defined in
+superclasses. The C<dependencies> and C<parameters> options will be merged with
+the existing values, rather than overridden. Note that literal services can't
+be extended, because there's nothing to extend. You can still override them
+entirely by declaring the service name without a leading C<'+'>.
+
 =item I<depends_on ($service_path)>
 
 The C<depends_on> function creates a L<Bread::Board::Dependency> object for the

-- 
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