commit ee5eb79081844259d98015f39e301e50fd88ca7b Author: Petr PÃsaÅ <ppisar@xxxxxxxxxx> Date: Mon Mar 7 17:24:18 2011 +0100 1.06 imported .gitignore | 1 + perl-Perl-Critic-Bangs.spec | 72 +++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 74 insertions(+), 0 deletions(-) --- diff --git a/.gitignore b/.gitignore index e69de29..9017b52 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Perl-Critic-Bangs-1.06.tar.gz diff --git a/perl-Perl-Critic-Bangs.spec b/perl-Perl-Critic-Bangs.spec new file mode 100644 index 0000000..718c497 --- /dev/null +++ b/perl-Perl-Critic-Bangs.spec @@ -0,0 +1,72 @@ +Name: perl-Perl-Critic-Bangs +Version: 1.06 +Release: 1%{?dist} +Summary: Collection of handy Perl::Critic policies +License: GPL+ or Artistic 2.0 +Group: Development/Libraries +URL: http://search.cpan.org/dist/Perl-Critic-Bangs/ +Source0: http://www.cpan.org/authors/id/P/PE/PETDANCE/Perl-Critic-Bangs-%{version}.tar.gz +BuildArch: noarch +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Perl::Critic) >= 1.098 +BuildRequires: perl(Perl::Critic::Policy) +BuildRequires: perl(Perl::Critic::Utils) +BuildRequires: perl(Perl::Critic::Utils::PPIRegexp) +BuildRequires: perl(Readonly) +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Perl::Critic) >= 1.01 +# Tests only: +BuildRequires: perl(File::Find) +BuildRequires: perl(Perl::Critic::PolicyFactory) +BuildRequires: perl(Perl::Critic::PolicyParameter) +BuildRequires: perl(Perl::Critic::TestUtils) +BuildRequires: perl(Perl::Critic::UserProfile) +BuildRequires: perl(Perl::Critic::Violation) +BuildRequires: perl(PPI::Cache) +BuildRequires: perl(PPI::Document) +BuildRequires: perl(Test::Pod) >= 1.00 +BuildRequires: perl(Test::Pod::Coverage) >= 1.06 +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Requires: perl(Perl::Critic) >= 1.098 +Requires: perl(Test::More) +Requires: perl(Test::Perl::Critic) >= 1.01 + +%description +The rules included with the Perl::Critic::Bangs group include: + - Commented-out code is usually noise. It should be removed. + - Watch for comments like "XXX", "TODO", etc. + - Tests should have a plan. + - Variables like $user and $user2 are insufficiently distinguished. + - Determining the class in a constructor by using "ref($proto) || $proto". + - Adding modifiers to a regular expression made up entirely of a variable + created with qr() is usually not doing what you expect. + - Vague variables like $data or $info are not descriptive enough. + +%prep +%setup -q -n Perl-Critic-Bangs-%{version} + +%build +%{__perl} Makefile.PL INSTALLDIRS=perl +make %{?_smp_mflags} + +%install +make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; +find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; +%{_fixperms} $RPM_BUILD_ROOT/* + +%check +make test + +%files +%defattr(-,root,root,-) +%doc Changes perlcriticrc README TODO +%{perl_privlib}/* +%{_mandir}/man3/* + +%changelog +* Thu Jan 27 2011 Petr Pisar <ppisar@xxxxxxxxxx> 1.06-1 +- Specfile autogenerated by cpanspec 1.78. +- Remove BuildRoot stuff +- Write description according POD. +- Install into perl core directory. diff --git a/sources b/sources index e69de29..ff4a30d 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +b7f024919fce71b30bb25a9279ba31d7 Perl-Critic-Bangs-1.06.tar.gz -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel