Data::Object::Role::Pluggable
Pluggable Role for Perl 5
package Example; use Data::Object::Class; with 'Data::Object::Role::Pluggable'; package main; my $example = Example->new;
This package provides a mechanism for dispatching to plugin classes.
This package implements the following methods:
plugin(Str $name, Any @args) : InstanceOf['Data::Object::Plugin']
The plugin method returns an instantiated plugin class whose namespace is based on the package name of the calling class and the $name argument provided. If the plugin cannot be loaded this method will cause the program to crash.
$name
# given: synopsis package Example::Plugin::Formatter; use Data::Object::Class; extends 'Data::Object::Plugin'; has name => ( is => 'ro' ); package main; $example->plugin(formatter => (name => 'lorem'));
Al Newkirk, awncorp@cpan.org
awncorp@cpan.org
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".
Wiki
Project
Initiatives
Milestones
Contributing
Issues
To install Data::Object::Role::Pluggable, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Object::Role::Pluggable
CPAN shell
perl -MCPAN -e shell install Data::Object::Role::Pluggable
For more information on module installation, please visit the detailed CPAN module installation guide.