Net::OAuth2::Scheme::Option::Builder - poor man's mixin/role closure builder
version 0.010001_001
use parent Net::OAuth2::TokenType::Option::Builder; Define_Group gearshift => tenspeed, qw(gearshift_doshift gearshift_coast); sub pkg_gearshift_tenspeed { my $self = shift; my $count = $self->uses(gearcount); $self->install(gearshift_doshift => sub { ... } $self->install(gearshift_coast => sub { ... } } sub pkg_gearshift_sturmey_archer { ... }
buh.
name => $value
Installs a value for option name.
name
$default
Gets the value for option name.
If no value has yet been intalled, installs a default value if one has been specified either here ($default) or elsewhere (e.g., using the defaults group or Define_value)
defaults
Otherwise, name must be part of some group, so we see which implementation for that group has been chosen and invoke it to set name (and whatever else) so that we can get a value.
'name'
Does uses('name') then adds 'name' to the list of exported options.
Does uses(name => $value) then dies if option name does not, in fact, have the value $value.
$value
<qw( name1 name2 ... )
Equivalent to uses(name1), uses(name2), etc..., returning the list of corresponding values.
name1
name2
Like Carp::croak but only for errors that are clearly the result of mistakes in option settings.
Roger Crew <crew@cs.stanford.edu>
This software is copyright (c) 2012 by Roger Crew.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Net::OAuth2::Scheme, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::OAuth2::Scheme
CPAN shell
perl -MCPAN -e shell install Net::OAuth2::Scheme
For more information on module installation, please visit the detailed CPAN module installation guide.