File perl-Perl-Critic.spec of Package perl-Perl-Critic

# spec file for package perl-Perl-Critic (Version 1.109)
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

# norootforbuild

%bcond_with test

Name:           perl-Perl-Critic
%define cpan_name Perl-Critic
Summary:        Critique Perl source code for best-practices
Version:        1.109
Release:        2
License:        GPL+ or Artistic
Group:          Development/Libraries/Perl
Source:         %{cpan_name}-%{version}.tar.bz2
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl(Module::Build)
BuildRequires:  perl-macros
%if %{with test}
BuildRequires:  perl(Test::Deep)
BuildRequires:  perl(Test::Memory::Cycle)
BuildRequires:  perl(base)
BuildRequires:  perl(B::Keywords) >= 1.05
BuildRequires:  perl(Carp)
BuildRequires:  perl(Config::Tiny) >= 2
BuildRequires:  perl(Email::Address) >= 1.889
BuildRequires:  perl(Exception::Class) >= 1.23
BuildRequires:  perl(Exporter)
BuildRequires:  perl(File::Basename)
BuildRequires:  perl(File::Find)
BuildRequires:  perl(File::HomeDir)
BuildRequires:  perl(File::Path)
BuildRequires:  perl(File::Spec)
BuildRequires:  perl(File::Spec::Unix)
BuildRequires:  perl(File::Temp)
BuildRequires:  perl(File::Which)
BuildRequires:  perl(Getopt::Long)
BuildRequires:  perl(IO::String)
BuildRequires:  perl(IPC::Open2) >= 1
BuildRequires:  perl(lib)
BuildRequires:  perl(List::MoreUtils) >= 0.19
BuildRequires:  perl(List::Util)
BuildRequires:  perl(overload)
BuildRequires:  perl(Perl::Tidy)
BuildRequires:  perl(Pod::Spell) >= 1
BuildRequires:  perl(PPI) >= 1.208
BuildRequires:  perl(PPI::Document) >= 1.208
BuildRequires:  perl(PPI::Document::File) >= 1.208
BuildRequires:  perl(PPI::Node) >= 1.208
BuildRequires:  perl(PPI::Token::Quote::Single) >= 1.208
BuildRequires:  perl(PPI::Token::Whitespace) >= 1.208
BuildRequires:  perl(PPIx::Regexp)
BuildRequires:  perl(PPIx::Utilities::Statement) >= 1.000
BuildRequires:  perl(Readonly) >= 1.03
BuildRequires:  perl(Readonly::XS)
BuildRequires:  perl(Scalar::Util)
BuildRequires:  perl(strict)
BuildRequires:  perl(String::Format) >= 1.13
BuildRequires:  perl(Task::Weaken)
BuildRequires:  perl(Text::ParseWords) >= 3
BuildRequires:  perl(version)
BuildRequires:  perl(warnings)
Requires:       perl(base)
Requires:       perl(B::Keywords) >= 1.05
Requires:       perl(Carp)
Requires:       perl(Config::Tiny) >= 2
Requires:       perl(Email::Address) >= 1.889
Requires:       perl(Exception::Class) >= 1.23
Requires:       perl(Exporter)
Requires:       perl(File::Basename)
Requires:       perl(File::Find)
Requires:       perl(File::HomeDir)
Requires:       perl(File::Path)
Requires:       perl(File::Spec)
Requires:       perl(File::Spec::Unix)
Requires:       perl(File::Temp)
Requires:       perl(File::Which)
Requires:       perl(Getopt::Long)
Requires:       perl(IO::String)
Requires:       perl(IPC::Open2) >= 1
Requires:       perl(List::MoreUtils) >= 0.19
Requires:       perl(List::Util)
Requires:       perl(overload)
Requires:       perl(Perl::Tidy)
Requires:       perl(Pod::Spell) >= 1
Requires:       perl(PPI) >= 1.208
Requires:       perl(PPI::Document) >= 1.208
Requires:       perl(PPI::Document::File) >= 1.208
Requires:       perl(PPI::Node) >= 1.208
Requires:       perl(PPI::Token::Quote::Single) >= 1.208
Requires:       perl(PPI::Token::Whitespace) >= 1.208
Requires:       perl(PPIx::Regexp)
Requires:       perl(PPIx::Utilities::Statement) >= 1.000
Requires:       perl(Readonly) >= 1.03
Requires:       perl(Readonly::XS)
Requires:       perl(Scalar::Util)
Requires:       perl(strict)
Requires:       perl(String::Format) >= 1.13
Requires:       perl(Task::Weaken)
Requires:       perl(Text::ParseWords) >= 3
Requires:       perl(version)
Requires:       perl(warnings)

Perl::Critic is an extensible framework for creating and applying coding
standards to Perl source code. Essentially, it is a static source code
analysis engine. Perl::Critic is distributed with a number of
Perl::Critic::Policy modules that attempt to enforce various coding
guidelines. Most Policy modules are based on Damian Conway's book Perl Best
Practices. However, Perl::Critic is not limited to PBP and will even
support Policies that contradict Conway. You can enable, disable, and
customize those Polices through the Perl::Critic interface. You can also
create new Policy modules that suit your own tastes.

For a command-line interface to Perl::Critic, see the documentation for
perlcritic. If you want to integrate Perl::Critic with your build
process, Test::Perl::Critic provides an interface that is suitable for
test programs. Also, Test::Perl::Critic::Progressive is useful for
gradually applying coding standards to legacy code. For the ultimate
convenience (at the expense of some flexibility) see the criticism

    Jeffrey Ryan Thalhammer <>

%setup -q -n %{cpan_name}-%{version}
# rpmlint: spurious-executable-perm
%{__chmod} 0644 tools/*

%{__perl} Build.PL installdirs=vendor
./Build build flags=%{?_smp_mflags}

./Build test

./Build install destdir=$RPM_BUILD_ROOT create_packlist=0

%{__rm} -rf $RPM_BUILD_ROOT

%files -f %{name}.files
%doc Changes examples extras LICENSE README tools xt

openSUSE Build Service is sponsored by