Data::Resolver - trial release with OOP interface

TL;DR

I uploaded a TRIAL release for Data::Resolver, with the new OOP interface.

And this is pretty much it.

Now, it’s possible to do something like this:

use Data::Resolver::FromDir;

my $res = Data::Resolver::FromDir->new(root => '/path/to/somewhere');

# get list of assets (files)
say for $res->list_assets;

# check presence of asset
say 'present!' if $res->has_asset('foobar.txt');

# retrieve it as Data::Resolver::Asset
my $asset = $res->get_asset('foobar.txt');

say 'asset available as file at ', $asset->file;
say 'asset contains: ', $asset->raw_data;

The same interface is supported for TAR archives too, making it possible to switch from one to the other seamlessly.

Next in line there will be a “canned” version that allows giving a list of resolvers, and will try all of them in sequence.

Stay resolved!


Comments? Octodon, , GitHub, Reddit, or drop me a line!