Gentoo::Dependency::AST - Convert a canonicalized (R|P|)DEPEND into an Abstract Syntax Tree
version 0.001001
Those familiar with Gentoo's ebuild format will be aware there are several variables that contain strings of dependencies that are required.
ebuild
Namely: PDEPEND , RDEPEND and DEPEND
PDEPEND
RDEPEND
DEPEND
If you're a paludis user, one can get the canonicalized versions of these variables via
paludis
cave show -c =cat/pkg-version
This module exists to parse those strings and provide a structured graph representing the dependencies:
use Gentoo::Dependency::AST; my $node = Gentoo::Dependency::AST->parse_dep_string( $string_from_portage );
parse_dep_string
$class->parse_dep_string( $string ) # returns Gentoo::Dependency::AST::Node of some kind
use?
useflag? ( children )
Maps to a ::Node::Group::Use
::Node::Group::Use
!use?
!useflag? ( children )
Maps to a ::Node::Group::NotUse
::Node::Group::NotUse
|| ()
|| ( children )
Maps to ::Node::Group::Or
::Node::Group::Or
()
( children )
Maps to ::Node::Group::And
::Node::Group::And
Kent Fredric <kentfredric@gmail.com>
This software is copyright (c) 2013 by Kent Fredric <kentfredric@gmail.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Gentoo::Dependency::AST, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gentoo::Dependency::AST
CPAN shell
perl -MCPAN -e shell install Gentoo::Dependency::AST
For more information on module installation, please visit the detailed CPAN module installation guide.