The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

SYNOPSIS

 use App::RPM::Spec::License;

 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.

EXAMPLE

 use strict;
 use warnings;

 use App::RPM::Spec::License;
 use File::Temp;
 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

 # Arguments.
 @ARGV = (
         $temp_dir,
 );

 # Run.
 exit App::RPM::Spec::License->new->run;

 # Output:
 # BSD
 # MIT

DEPENDENCIES

English, Error::Pure, File::Find::Rule, Getopt::Std. 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.01