# PODNAME: Config::Model::models::Dpkg::Copyright::LicenseSpec
# ABSTRACT:  Configuration class Dpkg::Copyright::LicenseSpec

=encoding utf8

=head1 NAME

Config::Model::models::Dpkg::Copyright::LicenseSpec - Configuration class Dpkg::Copyright::LicenseSpec

=head1 DESCRIPTION

Configuration classes used by L<Config::Model>

Stand-alone license paragraph. This paragraph is used to describe licenses which are used somewhere else in the Files paragraph.

=head1 Elements

=head2 text

Full license text. I< Optional. Type string.  > 

Note: text is computed with 

 require Software::LicenseMoreUtils ;
 my $lic = &index( - ) ;
 my $h = { short_name => $lic } ;
 my $text;
 
 if (defined $lic and $lic) {
    # no need to fail if short_name is unknown
    eval {
        $text = Software::LicenseMoreUtils->new_from_short_name($h)->summary_or_text ;
    } ;
    if ($text) {
        # need to cleanup text to mimic cleanup done when copyright
        # data is read from file
        chomp($text);
        # cleanup tabs, not allowed by copyright spec
        $text =~ s!\t!    !g;
        # cleanup empty lines (which are also cleaned up when writing file,
        # but this messes tests up)
        $text =~ s!\n +\n!\n\n!g;
    }
 # FIXME: find a way to warn user if a license is unknown only when
 # text is not set by another mean... may loop bad if not careful
 #   if ($@ and ! $self->value_object->{data}) {
 #       print "Cannot find license text for $lic\n" ;
 #   }
 }
 
 $text;

and with: 

=over

=item *



=back



=head1 SEE ALSO

=over

=item *

L<cme>

=back

=head1 AUTHOR

=over

=item Dominique Dumont


=back

=head1 COPYRIGHT

=over

=item 2010

=item 2011 Dominique Dumont


=back

=head1 LICENSE

=over

=item LGPL2


=back

=cut

