Data::Sah::Resolve provides resolve_schema. Sah schemas can be defined in terms of other schemas as base. The resolving process follows the (outermost) base schema until it finds a builtin type as the (innermost) base. It then returns a hash result (a DefHash with v=2) containing the type as well other information like the collected clause sets and others. This routine performs the following steps: 1. Normalize the schema Unless schema_is_normalized option is true, in which case schema is assumed to be normalized already. 2. Check if the schema's type is a builtin type Currently this is done by checking if the module of the name Data::Sah::Type::<type> is loadable. If it is a builtin type then we are done. 3. Check if the schema's type is the name of another schema This is done by checking if Sah::Schema::<name> module exists and is loadable. If this is the case then we retrieve the base schema from the $schema variable in the Sah::Schema::<name> package and repeat the process while accumulating and/or merging the clause sets. 4. If schema's type is neither, we die.
29 lines
695 B
Makefile
29 lines
695 B
Makefile
PORTNAME= Data-Sah-Resolve
|
|
PORTVERSION= 0.011
|
|
CATEGORIES= devel perl5
|
|
MASTER_SITES= CPAN
|
|
PKGNAMEPREFIX= p5-
|
|
|
|
MAINTAINER= sunpoet@FreeBSD.org
|
|
COMMENT= Resolve Sah schema
|
|
WWW= https://metacpan.org/dist/Data-Sah-Resolve
|
|
|
|
LICENSE= ART10 GPLv1+
|
|
LICENSE_COMB= dual
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
BUILD_DEPENDS= ${RUN_DEPENDS}
|
|
RUN_DEPENDS= p5-Data-ModeMerge>=0:devel/p5-Data-ModeMerge \
|
|
p5-Data-Sah-Normalize>=0.051:devel/p5-Data-Sah-Normalize
|
|
TEST_DEPENDS= p5-Data-Dmp>=0.241:devel/p5-Data-Dmp \
|
|
p5-Test-Deep>=0:devel/p5-Test-Deep \
|
|
p5-Test-Exception>=0:devel/p5-Test-Exception \
|
|
p5-Test-Needs>=0:devel/p5-Test-Needs
|
|
|
|
USES= perl5
|
|
USE_PERL5= configure
|
|
|
|
NO_ARCH= yes
|
|
|
|
.include <bsd.port.mk>
|