a4d4beb
Name:		perl-true
a4d4beb
Version:	0.18
a4d4beb
Release:	2%{?dist}
a4d4beb
Summary:	Automatically return a true value when a file is required
a4d4beb
License:	GPL+ or Artistic
a4d4beb
Group:		Development/Libraries
a4d4beb
URL:		https://metacpan.org/release/true
a4d4beb
Source0:	http://cpan.metacpan.org/authors/id/C/CH/CHOCOLATE/true-%{version}.tar.gz
a4d4beb
# ============= Module Build ====================
a4d4beb
BuildRequires:	perl(Config)
a4d4beb
BuildRequires:	perl(ExtUtils::Depends) >= 0.304
a4d4beb
BuildRequires:	perl(ExtUtils::MakeMaker)
a4d4beb
BuildRequires:	perl(File::Copy)
a4d4beb
# ============= Module Runtime ==================
a4d4beb
BuildRequires:	perl(B::Hooks::OP::Annotation) >= 0.43
a4d4beb
BuildRequires:	perl(B::Hooks::OP::Check) >= 0.18
a4d4beb
BuildRequires:	perl(Devel::StackTrace) >= 1.27
a4d4beb
BuildRequires:	perl(strict)
a4d4beb
BuildRequires:	perl(warnings)
a4d4beb
BuildRequires:	perl(XSLoader)
a4d4beb
# ============= Test Suite ======================
a4d4beb
BuildRequires:	perl(base)
a4d4beb
BuildRequires:	perl(File::Spec)
a4d4beb
BuildRequires:	perl(FindBin)
a4d4beb
BuildRequires:	perl(lib)
a4d4beb
BuildRequires:	perl(Test::More)
a4d4beb
BuildRequires:	perl(Test::Pod)
a4d4beb
# ============= Module Runtime ==================
a4d4beb
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
a4d4beb
a4d4beb
# Don't "provide" private Perl libs
a4d4beb
%{?perl_default_filter}
a4d4beb
a4d4beb
%description
a4d4beb
Perl's require built-in (and its use wrapper) requires the files it loads to
a4d4beb
return a true value. This is usually accomplished by placing a single
a4d4beb
a4d4beb
	1; 
a4d4beb
a4d4beb
statement at the end of included scripts or modules. It's not onerous to add
a4d4beb
but it's a speed bump on the Perl novice's road to enlightenment. In addition,
a4d4beb
it appears to be a non-sequitur to the uninitiated, leading some to attempt to
a4d4beb
mitigate its appearance with a comment:
a4d4beb
a4d4beb
	1; # keep require happy
a4d4beb
or:
a4d4beb
	1; # Do not remove this line
a4d4beb
or even:
a4d4beb
	1; # Must end with this, because Perl is bogus.
a4d4beb
a4d4beb
This module packages this "return true" behavior so that it need not be
a4d4beb
written explicitly. It can be used directly, but it is intended to be invoked
a4d4beb
from the import method of a Modern::Perl-style module that enables modern Perl
a4d4beb
features and conveniences and cleans up legacy Perl warts.
a4d4beb
a4d4beb
%prep
a4d4beb
%setup -q -n true-%{version}
a4d4beb
a4d4beb
%build
a4d4beb
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
a4d4beb
make %{?_smp_mflags}
a4d4beb
a4d4beb
%install
a4d4beb
make pure_install DESTDIR=%{buildroot}
a4d4beb
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
a4d4beb
find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
a4d4beb
%{_fixperms} %{buildroot}
a4d4beb
a4d4beb
%check
a4d4beb
make test
a4d4beb
a4d4beb
%files
a4d4beb
%doc Changes README
a4d4beb
%{perl_vendorarch}/auto/true/
a4d4beb
%{perl_vendorarch}/true.pm
a4d4beb
%{perl_vendorarch}/true/
a4d4beb
%{_mandir}/man3/true.3pm*
a4d4beb
%{_mandir}/man3/true::VERSION.3pm*
a4d4beb
a4d4beb
%changelog
a4d4beb
* Mon Aug 19 2013 Paul Howarth <paul@city-fan.org> - 0.18-2
a4d4beb
- Sanitize for Fedora submission
a4d4beb
a4d4beb
* Fri Aug 16 2013 Paul Howarth <paul@city-fan.org> - 0.18-1
a4d4beb
- Initial RPM version