e22ee1
Name:           perl-constant
e22ee1
Version:        1.27
e22ee1
Release:        2%{?dist}
e22ee1
Summary:        Perl pragma to declare constants
e22ee1
License:        GPL+ or Artistic
e22ee1
Group:          Development/Libraries
e22ee1
URL:            http://search.cpan.org/dist/constant/
e22ee1
Source0:        http://www.cpan.org/authors/id/S/SA/SAPER/constant-%{version}.tar.gz
e22ee1
BuildArch:      noarch
e22ee1
BuildRequires:  perl
e22ee1
BuildRequires:  perl(Module::Build)
e22ee1
BuildRequires:  perl(strict)
e22ee1
# Run-time:
e22ee1
BuildRequires:  perl(Carp)
e22ee1
BuildRequires:  perl(vars)
e22ee1
BuildRequires:  perl(warnings::register)
e22ee1
# Tests:
e22ee1
BuildRequires:  perl(Test::More)
e22ee1
BuildRequires:  perl(utf8)
e22ee1
BuildRequires:  perl(warnings)
e22ee1
# Optional tests:
e22ee1
BuildRequires:  perl(Test::Pod) >= 1.14
e22ee1
BuildRequires:  perl(Test::Pod::Coverage) >= 1.04
e22ee1
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
e22ee1
Requires:       perl(Carp)
e22ee1
e22ee1
%description
e22ee1
This pragma allows you to declare constants at compile-time:
e22ee1
e22ee1
use constant PI => 4 * atan2(1, 1);
e22ee1
e22ee1
When you declare a constant such as "PI" using the method shown above,
e22ee1
each machine your script runs upon can have as many digits of accuracy
e22ee1
as it can use. Also, your program will be easier to read, more likely
e22ee1
to be maintained (and maintained correctly), and far less likely to
e22ee1
send a space probe to the wrong planet because nobody noticed the one
e22ee1
equation in which you wrote 3.14195.
e22ee1
e22ee1
When a constant is used in an expression, Perl replaces it with its
e22ee1
value at compile time, and may then optimize the expression further.
e22ee1
In particular, any code in an "if (CONSTANT)" block will be optimized
e22ee1
away if the constant is false.
e22ee1
e22ee1
%prep
e22ee1
%setup -q -n constant-%{version}
e22ee1
e22ee1
%build
e22ee1
perl Build.PL installdirs=vendor
e22ee1
./Build
e22ee1
e22ee1
%install
e22ee1
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
e22ee1
%{_fixperms} $RPM_BUILD_ROOT/*
e22ee1
e22ee1
%check
e22ee1
./Build test
e22ee1
e22ee1
%files
e22ee1
%doc Changes eg README
e22ee1
%{perl_vendorlib}/*
e22ee1
%{_mandir}/man3/*
e22ee1
e22ee1
%changelog
e22ee1
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.27-2
e22ee1
- Mass rebuild 2013-12-27
e22ee1
e22ee1
* Thu Mar 21 2013 Petr Pisar <ppisar@redhat.com> 1.27-1
e22ee1
- Specfile autogenerated by cpanspec 1.78.