.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Bread::Board::Manual 3pm" .TH Bread::Board::Manual 3pm "2022-12-12" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bread::Board::Manual \- A manual for Bread::Board .SH "VERSION" .IX Header "VERSION" version 0.37 .SH "INTRODUCTION" .IX Header "INTRODUCTION" As we have said, Bread::Board is an inversion of control framework with a focus on dependency injection and lifecycle management. The goal that Bread::Board strives towards is to promote more decoupled designs. It does this by removing the need for your objects to be concerned with resolving and/or creating their dependencies as well as knowing (or caring) what their lifecycle is. .SS "Why should I use Bread::Board" .IX Subsection "Why should I use Bread::Board" First, it should be noted that Bread::Board and IoC are not universally useful. Smaller applications and one-off scripts would be overburdened by the abstractions of Bread::Board. But the larger your application becomes, the more something like Bread::Board can help. .PP As applications grow so the management of resources and their dependencies becomes more of a burden. Making sure all your components are properly initialized, in the right order and at all times that you need them, can become a twisty maze. Bread::Board is intended to help you manage this twisty maze and remove the need for you to manage this manually. .PP Take your typical Catalyst application, the Catalyst framework itself contains its own mini IoC framework through the component subsystem. Catalyst will manage your models and views making sure that they will be available when you need them in the controllers. Catalyst makes all this easy to manage through its configuration system. This is great inside your Catalyst application, but what about outside of it? Any sufficiently complex web application will have a set of scripts and/or command-line applications to help support it. At this point you are left to your own devices and must manage these components and their dependency chains on your own. .PP By decoupling IoC into its own stand-alone subsystem it becomes possible to get that same ease-of-use you get inside something like a Catalyst application, outside of it. .PP This, in a nutshell, is what Bread::Board aims to provide. .SH "SECTIONS" .IX Header "SECTIONS" .IP "Bread::Board::Manual::Concepts" 4 .IX Item "Bread::Board::Manual::Concepts" This is perhaps the best place to start, it will introduce you to the basic concepts that make up Bread::Board. .IP "Bread::Board::Manual::Concepts::Typemap" 4 .IX Item "Bread::Board::Manual::Concepts::Typemap" With Bread::Board you provide names for your service so that you can find them later. This document explores the new (read: experimental) typemap feature which allows you to map services to types as well. .IP "Bread::Board::Manual::Concepts::Advanced" 4 .IX Item "Bread::Board::Manual::Concepts::Advanced" Bread::Board is an extensible and open system, this document will explore how you can extend Bread::Board and get greater re-use of your components. .IP "Bread::Board::Manual::Example" 4 .IX Item "Bread::Board::Manual::Example" This is a set of examples meant to show how Bread::Board can be used in real-world scenarios. It is recommended that you read the above documentation first as many of these examples use the concepts discussed in them. .SH "AUTHOR" .IX Header "AUTHOR" Stevan Little .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests on the bugtracker website https://github.com/stevan/BreadBoard/issues .PP When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2019, 2017, 2016, 2015, 2014, 2013, 2011, 2009 by Infinity Interactive. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.