NAME

App::RPM::Spec::License - Base class for rpm-spec-license tool.

SYNOPSIS

my $app = App::RPM::Spec::License->new;
my $exit_code = $app->run;

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 File::Spec::Functions qw(catfile);
use IO::Barf qw(barf);
# 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 File::Spec::Functions qw(catfile);
use IO::Barf qw(barf);
# 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

http://skim.cz

LICENSE AND COPYRIGHT

© 2023 Michal Josef Špaček

BSD 2-Clause License

VERSION

0.02