Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
t
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Dist::META

The main intention of this module is to offer an uniform API for data that might be spread over different keys in the META6.json file.

This initial version, however, will focus on getting dependencies right, in a single array.

Installing

The usual

zef install Dist::META

Running

Dist::META subclasses META6; please check out that distribution for its common API. It adds a class attribute, .dependencies. Over this META6.json

{
  "name" : "JSON::Marshal",
  "tags" : [ "object", "serialisation", "JSON" ],
  "authors" : [ "Jonathan Stowe <jns+git@gellyfish.co.uk>" ],
  "author" : "Jonathan Stowe <jns+git@gellyfish.co.uk>",
  "auth" : "github:jonathanstowe",
  "support" : {
    "source" : "git://github.com/jonathanstowe/JSON-Marshal.git"
  },
  "source-url" : "git://github.com/jonathanstowe/JSON-Marshal.git",
  "perl" : "6",
  "build-depends" : [ ],
  "provides" : {
     "JSON::Marshal" : "lib/JSON/Marshal.pm"
  },
  "depends" : [ "JSON::Tiny" ],
  "test-depends" : [
    "Test"
  ],
  "description" : "Simple serialisation of objects to JSON",
  "version" : "0.0.1"
}

You can run this program

use Dist::META;
my $obj = Dist::META.new(file => $meta-path); # Use path to above file
say $obj.dependencies[0]; # Prints JSON::Tiny
say $obj.dependencies[0].DependencyType; # RUNTIMEDEP
say $obj.dependencies[1].DependencyType; # TESTDEP;

.dependencies is an array with all dependencies, "tagged" (using mix-ins ) with RUNTIMEDEP,BUILDDEP or TESTDEP, depending on where they have been defined (independently of the META6.json key they have used).

See also

Test::META tests that specifications are correct. [Pakku::Spec](https://github.com/hythm7/Pakku -Spec), part of the Pakku package manager, also contains a parser for `META6.json that is closer to the current spec.

License

This module will be licensed under the Artistic 2.0 License.

About

Provide unified interface to resources described in the META6.json meta file

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.