Nuvol::Config - Config for Nuvol connectors
use Nuvol; my $connector = Nuvol::connect($configfile); my $config = $connector->config; $config->access_token; $config->app_id; $config->app_secret; $config->digest; $config->file; $config->redirect_uri; $config->refresh_token; $config->save; $config->scope; $config->service; $config->validto;
Nuvol::Config is a file-based container for Nuvol connector configurations.
use Nuvol; $connector = Nuvol::connect($configfile); $config = $connector->config;
In daily use a Nuvol::Config is created with "config" in Nuvol::Connector.
use Nuvol::Config; %params = ( app_id => $app_id, app_secret => $app_secret, redirect_uri => $redirect_uri, scope => $scope, service => $service, ); $config = Nuvol::Config->new($configfile, \%params);
Internally the constructor is called. If the file doesn't exist the above parameters are required.
$access_token = $config->access_token; $config = $config->access_token($new_access_token);
Getter and setter for the access token.
$app_id = $config->app_id;
Getter for the app id.
$app_secret = $config->app_secret;
Getter for the app secret.
$digest = $config->digest;
Getter for the digest of the "file" at the time of the last access.
$file = $config->file;
Getter for the config file. Returns a Mojo::File with Mojo::File::Role::Digest.
$redirect_uri = $config->redirect_uri;
Getter for the redirect URI.
$refresh_token = $config->refresh_token; $config = $config->refresh_token($new_refresh_token);
Getter and setter for the refresh token.
$response_type = $config->response_type;
Getter for the authentication response type.
$config = $config->save;
Saves the current values to the config file.
$scope = $config->scope; $config = $config->scope($new_scope);
Getter and setter for the scope.
$service = $config->service;
Getter for the service of the connection.
$validto = $config->validto; $config = $config->validto($new_validto);
Getter and setter for the validto time.
Nuvol::Connector.
To install Nuvol, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Nuvol
CPAN shell
perl -MCPAN -e shell install Nuvol
For more information on module installation, please visit the detailed CPAN module installation guide.