2009-11-28 21:43:11 +00:00
|
|
|
#
|
2011-04-02 17:06:37 +00:00
|
|
|
# spec file for package perl-Perl-Critic (Version 1.115)
|
2010-07-14 23:46:46 +00:00
|
|
|
#
|
|
|
|
# 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 http://bugs.opensuse.org/
|
2009-11-28 21:43:11 +00:00
|
|
|
#
|
|
|
|
|
2010-07-14 23:46:46 +00:00
|
|
|
Name: perl-Perl-Critic
|
2011-04-02 17:06:37 +00:00
|
|
|
Version: 1.115
|
2011-03-31 18:27:59 +00:00
|
|
|
Release: 1
|
2010-07-14 23:46:46 +00:00
|
|
|
License: GPL+ or Artistic
|
2011-03-31 18:27:59 +00:00
|
|
|
%define cpan_name Perl-Critic
|
|
|
|
Summary: Critique Perl source code for best-practices.
|
2010-07-14 23:46:46 +00:00
|
|
|
Url: http://search.cpan.org/dist/Perl-Critic/
|
2011-03-31 18:27:59 +00:00
|
|
|
Group: Development/Libraries/Perl
|
|
|
|
#Source: http://www.cpan.org/authors/id/E/EL/ELLIOTJS/Perl-Critic-%{version}.tar.gz
|
|
|
|
Source: %{cpan_name}-%{version}.tar.gz
|
2010-07-14 23:46:46 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl(Module::Build)
|
|
|
|
BuildRequires: perl-macros
|
|
|
|
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
|
2011-03-31 18:27:59 +00:00
|
|
|
BuildRequires: perl(Exporter) >= 5.63
|
2010-07-14 23:46:46 +00:00
|
|
|
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
|
2011-03-31 18:27:59 +00:00
|
|
|
BuildRequires: perl(PPI) >= 1.215
|
|
|
|
BuildRequires: perl(PPI::Document) >= 1.215
|
|
|
|
BuildRequires: perl(PPI::Document::File) >= 1.215
|
|
|
|
BuildRequires: perl(PPI::Node) >= 1.215
|
|
|
|
BuildRequires: perl(PPI::Token::Quote::Single) >= 1.215
|
|
|
|
BuildRequires: perl(PPI::Token::Whitespace) >= 1.215
|
|
|
|
BuildRequires: perl(PPIx::Regexp) >= 0.01
|
|
|
|
BuildRequires: perl(PPIx::Utilities::Node) >= 1.001
|
|
|
|
BuildRequires: perl(PPIx::Utilities::Statement) >= 1.001
|
2010-07-14 23:46:46 +00:00
|
|
|
BuildRequires: perl(Readonly) >= 1.03
|
|
|
|
BuildRequires: perl(Readonly::XS)
|
|
|
|
BuildRequires: perl(Scalar::Util)
|
|
|
|
BuildRequires: perl(strict)
|
|
|
|
BuildRequires: perl(String::Format) >= 1.13
|
2010-07-15 00:20:12 +00:00
|
|
|
BuildRequires: perl(Task::Weaken)
|
2011-03-31 18:27:59 +00:00
|
|
|
BuildRequires: perl(Test::Deep)
|
2010-07-14 23:46:46 +00:00
|
|
|
BuildRequires: perl(Text::ParseWords) >= 3
|
2011-03-31 18:27:59 +00:00
|
|
|
BuildRequires: perl(version) >= 0.77
|
2010-07-14 23:46:46 +00:00
|
|
|
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
|
2011-03-31 18:27:59 +00:00
|
|
|
Requires: perl(Exporter) >= 5.63
|
2010-07-14 23:46:46 +00:00
|
|
|
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
|
2011-03-31 18:27:59 +00:00
|
|
|
Requires: perl(PPI) >= 1.215
|
|
|
|
Requires: perl(PPI::Document) >= 1.215
|
|
|
|
Requires: perl(PPI::Document::File) >= 1.215
|
|
|
|
Requires: perl(PPI::Node) >= 1.215
|
|
|
|
Requires: perl(PPI::Token::Quote::Single) >= 1.215
|
|
|
|
Requires: perl(PPI::Token::Whitespace) >= 1.215
|
|
|
|
Requires: perl(PPIx::Regexp) >= 0.01
|
|
|
|
Requires: perl(PPIx::Utilities::Node) >= 1.001
|
|
|
|
Requires: perl(PPIx::Utilities::Statement) >= 1.001
|
2010-07-14 23:46:46 +00:00
|
|
|
Requires: perl(Readonly) >= 1.03
|
|
|
|
Requires: perl(Readonly::XS)
|
|
|
|
Requires: perl(Scalar::Util)
|
|
|
|
Requires: perl(strict)
|
|
|
|
Requires: perl(String::Format) >= 1.13
|
2010-07-15 00:20:12 +00:00
|
|
|
Requires: perl(Task::Weaken)
|
2010-07-14 23:46:46 +00:00
|
|
|
Requires: perl(Text::ParseWords) >= 3
|
2011-03-31 18:27:59 +00:00
|
|
|
Requires: perl(version) >= 0.77
|
2010-07-14 23:46:46 +00:00
|
|
|
Requires: perl(warnings)
|
2011-03-31 18:27:59 +00:00
|
|
|
%{perl_requires}
|
2009-11-28 21:43:11 +00:00
|
|
|
|
|
|
|
%description
|
2010-07-14 23:46:46 +00:00
|
|
|
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
|
2011-03-31 18:27:59 +00:00
|
|
|
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
|
2010-07-14 23:46:46 +00:00
|
|
|
customize those Polices through the Perl::Critic interface. You can also
|
|
|
|
create new Policy modules that suit your own tastes.
|
2009-11-28 21:43:11 +00:00
|
|
|
|
2010-07-15 00:20:12 +00:00
|
|
|
For a command-line interface to Perl::Critic, see the documentation for
|
2011-03-31 18:27:59 +00:00
|
|
|
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 pragma.
|
|
|
|
|
|
|
|
Win32 and ActivePerl users can find PPM distributions of Perl::Critic at
|
|
|
|
the http://theoryx5.uwinnipeg.ca/ppms/ manpage and Alexandr Ciornii's
|
|
|
|
downloadable executable at the http://chorny.net/perl/perlcritic.html
|
|
|
|
manpage.
|
|
|
|
|
|
|
|
If you'd like to try Perl::Critic without installing anything, there is a
|
|
|
|
web-service available at the http://perlcritic.com manpage. The web-service
|
|
|
|
does not yet support all the configuration features that are available in
|
|
|
|
the native Perl::Critic API, but it should give you a good idea of what it
|
|
|
|
does. You can also invoke the perlcritic web-service from the command-line
|
|
|
|
by doing an HTTP-post, such as one of these:
|
|
|
|
|
|
|
|
$> POST http://perlcritic.com/perl/critic.pl < MyModule.pm
|
|
|
|
$> lwp-request -m POST http://perlcritic.com/perl/critic.pl < MyModule.pm
|
|
|
|
$> wget -q -O - --post-file=MyModule.pm http://perlcritic.com/perl/critic.pl
|
|
|
|
|
|
|
|
Please note that the perlcritic web-service is still alpha code. The URL
|
|
|
|
and interface to the service are subject to change.
|
2010-07-15 00:20:12 +00:00
|
|
|
|
2011-03-31 18:27:59 +00:00
|
|
|
Also, the Perl Development Kit (PDK 8.0) from ActiveState includes a very
|
|
|
|
slick graphical interface to Perl-Critic. For details, go to the
|
|
|
|
http://www.activestate.com/perl_dev_kit manpage
|
2009-11-28 21:43:11 +00:00
|
|
|
|
|
|
|
%prep
|
2010-07-14 23:46:46 +00:00
|
|
|
%setup -q -n %{cpan_name}-%{version}
|
2009-11-28 21:43:11 +00:00
|
|
|
|
|
|
|
%build
|
2010-07-14 23:46:46 +00:00
|
|
|
%{__perl} Build.PL installdirs=vendor
|
2010-11-19 15:26:45 +00:00
|
|
|
./Build build flags=%{?_smp_mflags}
|
2009-11-28 21:43:11 +00:00
|
|
|
|
|
|
|
%check
|
2011-04-02 17:06:37 +00:00
|
|
|
# fails currently ./Build test
|
2009-11-28 21:43:11 +00:00
|
|
|
|
|
|
|
%install
|
2011-03-31 18:27:59 +00:00
|
|
|
./Build install destdir=%{buildroot} create_packlist=0
|
2010-07-14 23:46:46 +00:00
|
|
|
%perl_gen_filelist
|
2009-11-28 21:43:11 +00:00
|
|
|
|
|
|
|
%clean
|
2011-03-31 18:27:59 +00:00
|
|
|
%{__rm} -rf %{buildroot}
|
2009-11-28 21:43:11 +00:00
|
|
|
|
2010-07-14 23:46:46 +00:00
|
|
|
%files -f %{name}.files
|
2011-03-31 18:27:59 +00:00
|
|
|
%defattr(644,root,root,755)
|
2010-07-14 23:46:46 +00:00
|
|
|
%doc Changes examples extras LICENSE README tools xt
|
2009-11-28 21:43:11 +00:00
|
|
|
|
|
|
|
%changelog
|