Nuvol::Drive - Container for cloud drives
use Nuvol; my $connector = Nuvol::connect($configfile); my $drive = $connector->drive($path); use Nuvol::Drive; my $drive = Nuvol::Drive->new($connector, $params); $drive->connector; $drive->item; # metadata $drive->description; $drive->id; $drive->metadata; $drive->name;
Nuvol::Drive is a container for cloud drives. The constructor automatically activated the appropriate service, which is one of Nuvol::Dummy::Drive, Nuvol::Office365::Drive.
use Nuvol; $connector = Nuvol::connect($configfile); $drive = $connector->drive($path); $drive = $connector->drives->first;
In daily use a Nuvol::Drive is created with "drive" in Nuvol::Connector or "drives" in Nuvol::Connector.
$drive = Nuvol::Drive->new($connector, {id => $id}); $drive = Nuvol::Drive->new($connector, {metadata => $metadata}); $drive = Nuvol::Drive->new($connector, {path => $path});
The constructor is called internally and can be used when the metadata or id of the drive are known.
metadata
id
Nuvol::Connector inherits the following methods from Nuvol::Role::Metadata:
$connector = $drive->connector;
Getter for the connector. Returns a Nuvol::Connector.
$item = $drive->item($path);
Getter for an item with the specified path. Returns a Nuvol::Item.
path
$file = $drive->item('path/to/file'); $folder = $drive->item('path/to/folder/');
Paths with trailing slash are interpreted as folders, without slash as files.
Nuvol::Connector, Nuvol::Item, Nuvol::Role::File, Nuvol::Role::Folder.
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.