| 1 | package XML::Validator::Schema::AttributeNode; | ||||||||||
| 2 | 5 | ▶ | use base 'XML::Validator::Schema::Node'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 5 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 5 | ▶ | use XML::Validator::Schema::Util qw(_attr _err); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 5 | ▶ | use Carp qw(confess); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | =head1 NAME | ||||||||||
| 10 | |||||||||||
| 11 | XML::Validator::Schema::AttributeNode | ||||||||||
| 12 | |||||||||||
| 13 | =head1 DESCRIPTION | ||||||||||
| 14 | |||||||||||
| 15 | Temporary node in the schema parse tree to represent an attribute. | ||||||||||
| 16 | |||||||||||
| 17 | =cut | ||||||||||
| 18 | |||||||||||
| 19 | 27 | ▶ | sub parse { | ||||||||
|
Subroutine
parse: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 20 | 27 | my ($pkg, $data) = @_; | |||||||||
| 21 | 27 | my $self = $pkg->new(); | |||||||||
| 22 | |||||||||||
| 23 | # squirl away data for latter use | ||||||||||
| 24 | 27 | $self->{data} = $data; | |||||||||
| 25 | |||||||||||
| 26 | 27 | return $self; | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 27 | ▶ | sub compile { | ||||||||
|
Subroutine
compile: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 30 | 27 | my ($self) = shift; | |||||||||
| 31 | |||||||||||
| 32 | # create a new attribute object and return it | ||||||||||
| 33 | 27 | my $attr = XML::Validator::Schema::Attribute->parse($self->{data}); | |||||||||
| 34 | |||||||||||
| 35 | # copy in type info if available | ||||||||||
| 36 | 27 | ▶ | $attr->{type} = $self->{type} if $self->{type}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 37 | |||||||||||
| 38 | 27 | return $attr; | |||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | 5 | 1; | |||||||||