=encoding utf8

=head1 NAME

OODoc::Text::Section - collects the text of one section within a chapter

=head1 INHERITANCE

 OODoc::Text::Section
   is an OODoc::Text::Structure
   is an OODoc::Text
   is an OODoc::Object

=head1 SYNOPSIS

  my $chapter = $section->chapter;
  my @subsect = $section->subsections;

  my $index   = $section->subsection('INDEX');

  my $index   = OODoc::Text::SubSection->new(...);
  $section->subsection($index);           # add subsection

=head1 DESCRIPTION

Extends L<"DESCRIPTION" in OODoc::Text::Structure|OODoc::Text::Structure/"DESCRIPTION">.

=head1 OVERLOADED

Extends L<"OVERLOADED" in OODoc::Text::Structure|OODoc::Text::Structure/"OVERLOADED">.

=over 4

=item overload: B<'!='> (numeric different)

Inherited, see L<OODoc::Object/"OVERLOADED">

=item overload: B<'""'> (stringification)

Inherited, see L<OODoc::Text/"OVERLOADED">

=item overload: B<'=='> (numeric equivalent)

Inherited, see L<OODoc::Object/"OVERLOADED">

=item overload: B<'bool'> 

Inherited, see L<OODoc::Object/"OVERLOADED">

=item overload: B<'cmp'> (string comparison)

Inherited, see L<OODoc::Text/"OVERLOADED">

=back

=head1 METHODS

Extends L<"METHODS" in OODoc::Text::Structure|OODoc::Text::Structure/"METHODS">.

=head2 Constructors

Extends L<"Constructors" in OODoc::Text::Structure|OODoc::Text::Structure/"Constructors">.

=over 4

=item $obj-E<gt>B<emptyExtension>($container)

Inherited, see L<OODoc::Text::Structure/"Constructors">

=item $class-E<gt>B<new>(%options)

Inherited, see L<OODoc::Object/"Constructors">

 -Option     --Defined in            --Default
  chapter                              <required>
  container    OODoc::Text             new(chapter)
  description  OODoc::Text             <empty string>
  level        OODoc::Text::Structure  2
  linenr       OODoc::Text             <required>
  name         OODoc::Text             undef
  type         OODoc::Text             'Section'

=over 2

=item chapter => OBJECT

=item container => OBJECT

=item description => STRING

=item level => INTEGER

=item linenr => INTEGER

=item name => STRING

=item type => STRING

=back

=back

=head2 Attributes

Extends L<"Attributes" in OODoc::Text::Structure|OODoc::Text::Structure/"Attributes">.

=over 4

=item $obj-E<gt>B<container>( [$object] )

Inherited, see L<OODoc::Text/"Attributes">

=item $obj-E<gt>B<description>()

Inherited, see L<OODoc::Text/"Attributes">

=item $obj-E<gt>B<extends>( [$object] )

Inherited, see L<OODoc::Text/"Attributes">

=item $obj-E<gt>B<level>()

Inherited, see L<OODoc::Text::Structure/"Attributes">

=item $obj-E<gt>B<linenr>()

Inherited, see L<OODoc::Text/"Attributes">

=item $obj-E<gt>B<manual>()

Inherited, see L<OODoc::Text/"Attributes">

=item $obj-E<gt>B<name>()

Inherited, see L<OODoc::Text/"Attributes">

=item $obj-E<gt>B<niceName>()

Inherited, see L<OODoc::Text::Structure/"Attributes">

=item $obj-E<gt>B<publish>(\%options)

Inherited, see L<OODoc::Object/"Attributes">

=item $obj-E<gt>B<type>()

Inherited, see L<OODoc::Text/"Attributes">

=item $obj-E<gt>B<unique>()

Inherited, see L<OODoc::Object/"Attributes">

=item $obj-E<gt>B<where>()

Inherited, see L<OODoc::Text/"Attributes">

=back

=head2 Location

Extends L<"Location" in OODoc::Text::Structure|OODoc::Text::Structure/"Location">.

=over 4

=item $obj-E<gt>B<chapter>()

Returns the chapter object for this section.

=item $obj-E<gt>B<findEntry>($name)

Inherited, see L<OODoc::Text::Structure/"Location">

=item $obj-E<gt>B<path>()

Inherited, see L<OODoc::Text::Structure/"Location">

=back

=head2 Collected

Extends L<"Collected" in OODoc::Text::Structure|OODoc::Text::Structure/"Collected">.

=over 4

=item $obj-E<gt>B<addExample>($object)

Inherited, see L<OODoc::Text/"Collected">

=item $obj-E<gt>B<all>($method, \%parameters)

Inherited, see L<OODoc::Text::Structure/"Collected">

=item $obj-E<gt>B<examples>()

Inherited, see L<OODoc::Text/"Collected">

=item $obj-E<gt>B<findDescriptionObject>()

Inherited, see L<OODoc::Text/"Collected">

=item $obj-E<gt>B<isEmpty>()

Inherited, see L<OODoc::Text::Structure/"Collected">

=item $obj-E<gt>B<openDescription>()

Inherited, see L<OODoc::Text/"Collected">

=back

=head2 Subroutines

Extends L<"Subroutines" in OODoc::Text::Structure|OODoc::Text::Structure/"Subroutines">.

=over 4

=item $obj-E<gt>B<addSubroutine>($file, @objects)

Inherited, see L<OODoc::Text::Structure/"Subroutines">

=item $obj-E<gt>B<setSubroutines>(\@subs)

Inherited, see L<OODoc::Text::Structure/"Subroutines">

=item $obj-E<gt>B<subroutine>($name)

Inherited, see L<OODoc::Text::Structure/"Subroutines">

=item $obj-E<gt>B<subroutines>()

Inherited, see L<OODoc::Text::Structure/"Subroutines">

=back

=head2 Subsections

=over 4

=item $obj-E<gt>B<subsection>($name|$object)

With a C<$name>, the subsection within this section with that name is
returned.  With an C<$object> (which must be a L<OODoc::Text::SubSection|OODoc::Text::SubSection>),
a new subsection is added to the end of the list.

=item $obj-E<gt>B<subsections>( [$subsections] )

Returns a list of all subsections in this chapter.

=back

=head1 SEE ALSO

This module is part of OODoc version 3.04,
built on September 12, 2025. Website: F<https://perl.overmeer.net/oodoc/>

=head1 LICENSE

For contributors see file ChangeLog.

This software is copyright (c) 2003-2025 by Mark Overmeer.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

