| 1 | package XML::Validator::Schema::Node; | ||||||||||
| 2 | 5 | ▶ | use base qw(Tree::DAG_Node); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | =head1 NAME | ||||||||||
| 5 | |||||||||||
| 6 | XML::Validator::Schema::Node | ||||||||||
| 7 | |||||||||||
| 8 | =head1 DESCRIPTION | ||||||||||
| 9 | |||||||||||
| 10 | Base class for nodes in the schema tree. Used by both temporary nodes | ||||||||||
| 11 | resolved during compilation (ex. ::ModelNode) and permanent nodes | ||||||||||
| 12 | (ex. ::ElementNode). | ||||||||||
| 13 | |||||||||||
| 14 | This is an abstract base class and may not be directly instantiated. | ||||||||||
| 15 | |||||||||||
| 16 | =cut | ||||||||||
| 17 | |||||||||||
| 18 | 439 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||
| 19 | 439 | my $pkg = shift; | |||||||||
| 20 | 439 | ▶ | croak("Illegal attempt to instantiate a Node directly!") | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | if $pkg eq __PACKAGE__; | ||||||||||
| 22 | 439 | return $pkg->SUPER::new(@_); | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 0 | ▶ | sub parse { | ||||||||
|
Subroutine
parse: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 26 | 0 | my $pkg = shift; | |||||||||
| 27 | 0 | croak("$pkg neglected to supply a parse() implementation!"); | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | # override to declare root-ness | ||||||||||
| 31 | 133 | ▶ | sub is_root { | ||||||||
|
Subroutine
is_root: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 32 | 133 | ▶ | return 0 if shift->{mother}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | 34 | return 1; | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 5 | 1; | |||||||||
| 37 | |||||||||||