6 # type = type of PTF Section
7 # name = name of PTF Section (can be blank)
8 # sections = array of section references
9 # assignments = hash of assignments
13 my $class = ref($invocant) || $invocant;
19 bless ($self, $class);
24 my ($self, $section) = @_;
25 push @
{$self->{sections
}}, $section;
29 my ($self, $type) = @_;
32 return @
{$self->{sections
}};
36 foreach my $section (@
{$self->{sections
}}) {
37 if ($section->type eq $type) {
38 push @matchedSections, $section;
42 return @matchedSections;
46 my ($self, $type, $name) = @_;
52 foreach my $section (@
{$self->{sections
}}) {
53 if ($section->type eq $type and $section->name eq $name) {
61 my ($self, $name, $value) = @_;
62 $self->{assignments
}{$name} = $value;
66 my ($self, $name) = @_;
67 return $self->{assignments
}{$name};