=head1 NAME

Pod::Weaver::Section::GenerateSection - add pod section from an interpreted piece of text

=head1 VERSION

version 1.00

=head1 SYNOPSIS

In your F<weaver.ini>

  [GenerateSection]
  title = HOMEPAGE
  text  = This is the POD for distribution {{$name}}. Check out what we have
  text  = been up to at {{$homepage}}

The title value can be ommited if passed as the plugin name:

  [GenerateSection / HOMEPAGE]

=head1 DESCRIPTION

This plugin attempts to be a cross between L<Pod::Weaver::Section::Template> and
L<Dist::Zilla::Plugin::GenerateFile> without the generation of extra files.

The values of text are concatenated and variable names with matching values on
the distribution are interpolated. Specifying the heading level allows to write
down a rather long section of POD text without need for extra files. For
example:

  [GenerateSection / FEEDBACK]
  head = 1
  [GenerateSection / Reporting bugs]
  head = 2
  text = Please report bugs when you find them. While we do have a mailing
  text = list, please use the bug tracker at {{$bugtracker_web}}
  text = to report bugs
  [GenerateSection / Homegape]
  head = 2
  text = Also, come check out our other projects at
  text = {{$homepage}}

=head1 ATTRIBUTES

=head2 text

The text to be added to the section. Multiple values are allowed and will be
concatenated. Certain sequences on the text will be replaced (see below).

=head2 head

The heading level of this section. Defaults to 1.

=head2 title

The title for this section. It can optionally be omitted and passed as the
plugin name.

=head2 main_module_only

If true, it will add the text only to the main module POD. Defaults to false.

=head2 is_template

If false, it will not attempt to replace the {{}} entries on text. Defaults to
true.

=head1 Text as template

Unless the option C<is_template> is false, the text will be run through
L<Text::Template>.  The variables C<$plugin>, C<$dist>, and C<$distmeta> will be
provided, set to the GenerateSection plugin, C<Dist::Zilla> object, and the
distribution metadata hash respectively. For convenience, the following
variables are also set:

=over

=item $name

=item $version

=item $homepage

=item $repository_web

=item $repository_url

=item $bugtracker_web

=item $bugtracker_email

=back

=head1 AUTHOR

Carnë Draug <cdraug@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is Copyright (c) 2013 by Carnë Draug.

This is free software, licensed under:

  The GNU General Public License, Version 3, June 2007