Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 9582c9d05a1089d440aa5b4675855a30 > files > 2

perl-UNIVERSAL-can-1.201.207.260-2.mga3.src.rpm

%define upstream_name    UNIVERSAL-can
%define upstream_version 1.20120726

Name:       perl-%{upstream_name}
Version:    %perl_convert_version %{upstream_version}
Release:    %mkrel 2

Summary:    Hack around calling UNIVERSAL::can() as a function
License:    GPL+ or Artistic
Group:      Development/Perl
Url:        http://search.cpan.org/dist/%{upstream_name}
Source0:    http://www.cpan.org/modules/by-module/UNIVERSAL/%{upstream_name}-%{upstream_version}.tar.gz

BuildRequires: perl(ExtUtils::MakeMaker) >= 6.300.0
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(Test::More)
BuildRequires: perl(overload)
BuildRequires: perl(strict)
BuildRequires: perl(vars)
BuildRequires: perl(warnings)
BuildRequires: perl(warnings::register)
BuildArch:  noarch

%description
The UNIVERSAL class provides a few default methods so that all objects can use
them. Object orientation allows programmers to override these methods in
subclasses to provide more specific and appropriate behavior.

Some authors call methods in the UNIVERSAL class on potential invocants as
functions, bypassing any possible overriding. This is wrong and you should not
do it. Unfortunately, not everyone heeds this warning and their bad code can
break your good code.

Fortunately, this upstream_name replaces UNIVERSAL::can() with a method that checks to
see if the first argument is a valid invocant (whether an object -- a blessed
referent -- or the name of a class). If so, and if the invocant's class has its
own can() method, it calls that as a method. Otherwise, everything works as you
might expect.

If someone attempts to call UNIVERSAL::can() as a function, this upstream_name will
emit a lexical warning (see perllexwarn) to that effect. You can disable it
with no warnings; or no warnings 'UNIVERSAL::isa';, but don't do that; fix the
code instead.

%prep
%setup -q -n %{upstream_name}-%{upstream_version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%make

%check
%make test

%install
%makeinstall_std

%files 
%doc Changes LICENSE META.yml MYMETA.yml README
%{perl_vendorlib}/UNIVERSAL
%{_mandir}/*/*

%changelog

* Sun Jan 13 2013 umeabot <umeabot> 1.201.207.260-2.mga3
+ Revision: 374513
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Fri Aug 31 2012 kharec <kharec> 1.201.207.260-1.mga3
+ Revision: 286568
- update to 1.20120726

* Tue Jun 21 2011 jquelin <jquelin> 1.201.106.170-1.mga2
+ Revision: 111459
- update to 1.20110617

* Fri Jun 17 2011 jquelin <jquelin> 1.201.106.140-1.mga2
+ Revision: 109024
- update to 1.20110614

* Fri Jan 21 2011 jquelin <jquelin> 1.160.0-1.mga1
+ Revision: 29231
- mageia rebuild
- imported package perl-UNIVERSAL-can