->[0] }
sub last { shift->items->[-1] }
sub join { join($_[1] // '', @{$_[0]->items}) }
sub TO_JSON { [@{shift->items}] }
1;
__END__
=encoding utf-8
=head1 NAME
CSAF::Util::List - (Mojo like)
head1 DESCRIPTION
L<CSAF::Util::List> is a collection utility.
=head2 METHODS
=over
=item TO_JSON
Alias for L</"to_array">.
=item add
Alias for L</"item">.
=item each
Evaluate callback for e
ss $lang;
# Subtags in official testsuite (optional/oasis_csaf_tc-csaf_2_0-2021-6-2-14-*.json)
if ($lang =~ /\-(AA|XP|ZZ|QM|QABC)$/i) {
return $self->add_message(
r->new(data => $_[1])->parse }
sub to_string { shift->renderer->render }
sub TO_JSON { shift->builder->TO_JSON }
1;
__END__
=encoding utf-8
=head1 NAME
CSAF - Common Security Advisory Frame
vulnerabilities
Return L<CSAF::Type::Vulnerabilities>.
=back
=head2 HELPERS
=over
=item TO_JSON
=item builder
Return L<CSAF::Builder>.
=item render
Alias for C<renderer-E<gt>render($format)
le
Parse CSAF document file and return L<CSAF>.
=item to_string
Render CSAF document.
my $json = $csaf->to_string;
=item writer
Return L<CSAF::Writer>.
=back
=head1 SUPPORT
=head2 Bugs /