Beam::Wire::Moose - Dependency Injection with extra Moose features
# container.yml db: class: My::Database with: - My::Role::Cache - My::Role::Log args: dbh: { ref: dbh } dbh: class: DBI args: - 'dbi:sqlite:data.db'
Beam::Wire::Moose is a subclass of Beam::Wire that adds support for Moose-specific features.
Compose roles into this object at run-time. This creates an anonymous class that extends the class config and consumes the roles defined by with.
class
with
NOTE: This means the service is not an instance of class but an instance of a class that inherits from class. Be cautious when using ref and Scalar::Util::blessed.
ref
Scalar::Util::blessed
To install Beam::Wire::Moose, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Beam::Wire::Moose
CPAN shell
perl -MCPAN -e shell install Beam::Wire::Moose
For more information on module installation, please visit the detailed CPAN module installation guide.