NAME Gentoo::MetaEbuild::Spec::Base - A Base Class for Gentoo MetaEbuild Specifications. VERSION version 0.1.4 SYNOPSIS use Gentoo::MetaEbuild::Spec::Base; # or some derived class Gentoo::MetaEbuild::Spec::Base->check( $datastructure ); This base-class only validates the most basic of basic, that the data is a { } using Data::Rx and using the shipped File::ShareDir v1.0.0.json spec to do that. This will be more practical in consuming classes as they'll override selected methods/ship different spec files, but maintain the same useful interface. METHODS check Packagename->check( $datastructure ); Packagename->check( $datastructure, \%opts ); Packagename->check( $datastructure, { version => '0.1.0' }); EXTENDING Extending should be this simple: package FooBarBaz; use Moose; extends 'Gentoo::MetaEbuild::Spec::Base'; 1; and then ship a directory of Data::Rx spec files as the Module ShareDir for that module. TESTING The only fun thing with testing is the File::ShareDir directory hasn't been installed yet, but its simple to get around. use FindBin; use Path::Class qw( dir ); use Gentoo::MetaEbuild::Spec::Base; Gentoo::MetaEbuild::Spec::Base->_spec_dir( dir($FindBin::Bin)->parent->subdir('share') ); # Code as per usual. my $shareroot = dir($FindBin::Bin)->parent(); AUTHOR Kent Fredric COPYRIGHT AND LICENSE This software is copyright (c) 2012 by Kent Fredric . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.