[perl-true] Initial import (perl-true-0.18-2)

Paul Howarth pghmcfc at fedoraproject.org
Thu Aug 22 14:33:27 UTC 2013


commit a4d4bebc49bce5ed8f64ba50c1bb380ae160d9ef
Author: Paul Howarth <paul at city-fan.org>
Date:   Thu Aug 22 15:32:20 2013 +0100

    Initial import (perl-true-0.18-2)
    
    Perl's require built-in (and its use wrapper) requires the files it loads to
    return a true value. This is usually accomplished by placing a single
    
           1;
    
    statement at the end of included scripts or modules. It's not onerous to add
    but it's a speed bump on the Perl novice's road to enlightenment. In addition,
    it appears to be a non-sequitur to the uninitiated, leading some to attempt to
    mitigate its appearance with a comment:
    
           1; # keep require happy
    or:
           1; # Do not remove this line
    or even:
           1; # Must end with this, because Perl is bogus.
    
    This module packages this "return true" behavior so that it need not be
    written explicitly. It can be used directly, but it is intended to be invoked
    from the import method of a Modern::Perl-style module that enables modern Perl
    features and conveniences and cleans up legacy Perl warts.

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



More information about the perl-devel mailing list