NAME
App::RPM::Spec::License - Base class for rpm-spec-license tool.
SYNOPSIS
METHODS
new
my
$app
= App::RPM::Spec::License->new;
Constructor.
Returns instance of object.
run
my
$exit_code
=
$app
->run;
Run.
Returns 1 for error, 0 for success.
EXAMPLE1
use
strict;
use
warnings;
use
File::Temp;
# Temp dir.
my
$temp_dir
= File::Temp->newdir;
barf(catfile(
$temp_dir
,
'ex1.spec'
),
<<'END');
License: BSD
END
barf(catfile(
$temp_dir
,
'ex2.spec'
),
<<'END');
License: MIT
END
barf(catfile(
$temp_dir
,
'ex3.spec'
),
<<'END');
License: MIT
END
# Arguments.
@ARGV
= (
$temp_dir
,
);
# Run.
exit
App::RPM::Spec::License->new->run;
# Output:
# BSD
# MIT
# MIT
EXAMPLE2
use
strict;
use
warnings;
use
File::Temp;
# Temp dir.
my
$temp_dir
= File::Temp->newdir;
barf(catfile(
$temp_dir
,
'ex1.spec'
),
<<'END');
License: BSD
END
barf(catfile(
$temp_dir
,
'ex2.spec'
),
<<'END');
License: MIT
END
barf(catfile(
$temp_dir
,
'ex3.spec'
),
<<'END');
License: MIT
END
# Arguments.
@ARGV
= (
'-u'
,
$temp_dir
,
);
# Run.
exit
App::RPM::Spec::License->new->run;
# Output:
# BSD
# MIT
DEPENDENCIES
English, Error::Pure, File::Find::Rule, Getopt::Std. List::Util, Parse::RPM::Spec,
REPOSITORY
https://github.com/michal-josef-spacek/App-RPM-Spec-License
AUTHOR
Michal Josef Špaček mailto:skim@cpan.org
LICENSE AND COPYRIGHT
© 2023 Michal Josef Špaček
BSD 2-Clause License
VERSION
0.02