other versions
- buster 2.122
- testing 2.143
- unstable 2.143
- experimental 2.146
| Config::Model::models::Dpkg::Copyright::LicenseSpec(3pm) | User Contributed Perl Documentation | Config::Model::models::Dpkg::Copyright::LicenseSpec(3pm) |
NAME¶
Config::Model::models::Dpkg::Copyright::LicenseSpec - Configuration class Dpkg::Copyright::LicenseSpecDESCRIPTION¶
Configuration classes used by Config::ModelStand-alone license paragraph. This paragraph is used to describe licenses which are used somewhere else in the Files paragraph.
Elements¶
text¶
Full license text. Optional. Type string.Note: text is computed with
require Software::LicenseMoreUtils ;
my $lic = &index( - ) ;
my $h = { short_name => $lic, holder => 'foo' } ;
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);
# work-around a bug in lgpl license text summary... my bad :-/
$text =~ s!^\.!!mg;
}
# 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:
- •
SEE ALSO¶
- •
- cme
AUTHOR¶
- Dominique Dumont
COPYRIGHT¶
- 2010
- 2011 Dominique Dumont
LICENSE¶
- LGPL2
| 2019-02-20 | perl v5.28.1 |