[packages/perl-Safe-Isa] - new
baggins
baggins at pld-linux.org
Sat Feb 7 18:10:00 CET 2026
commit bcccba5e315c7185dadf873133baf17be95abc83
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat Feb 7 19:09:51 2026 +0100
- new
perl-Safe-Isa.spec | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
---
diff --git a/perl-Safe-Isa.spec b/perl-Safe-Isa.spec
new file mode 100644
index 0000000..319606e
--- /dev/null
+++ b/perl-Safe-Isa.spec
@@ -0,0 +1,59 @@
+#
+# Conditional build:
+%bcond_without tests # unit tests
+#
+%define pdir Safe
+%define pnam Isa
+Summary: Safe::Isa - Call isa, can, does and DOES safely on things that may not be objects
+Name: perl-Safe-Isa
+Version: 1.000010
+Release: 1
+# same as perl
+License: GPL v1+ or Artistic
+Group: Development/Languages/Perl
+Source0: http://www.cpan.org/modules/by-module/Safe/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: f68579f6acfeb2e19d7d9a65100399d8
+URL: https://metacpan.org/dist/Safe-Isa
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
+BuildRequires: rpmbuild(macros) >= 1.745
+%if %{with tests}
+%endif
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+How many times have you found yourself writing:
+
+ if ($obj->isa('Something')) {
+
+and then shortly afterwards cursing and changing it to:
+
+ if (Scalar::Util::blessed($obj) and $obj->isa('Something')) {
+
+Right. That's why this module exists.
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+
+%build
+%{__perl} Makefile.PL \
+ INSTALLDIRS=vendor
+%{__make}
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} pure_install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes README
+%{perl_vendorlib}/Safe/Isa.pm
+%{_mandir}/man3/*
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl-Safe-Isa.git/commitdiff/bcccba5e315c7185dadf873133baf17be95abc83
More information about the pld-cvs-commit
mailing list