Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 0e84390807d98ead770877ce381eafcb > files > 2

perl-UNIVERSAL-can-1.12-6mdv2009.0.src.rpm

%define module  UNIVERSAL-can
%define name    perl-%{module}
%define version 1.12
%define release %mkrel 6

Name:           %{name}
Version:        %{version}
Release:        %{release}
Summary:        Hack around calling UNIVERSAL::can() as a function
License:        GPL or Artistic
Group:          Development/Perl
Url:            http://search.cpan.org/dist/%{module}
Source:         http://www.cpan.org/modules/by-module/UNIVERSAL/%{module}-%{version}.tar.bz2
%if %{mdkversion} < 1010
BuildRequires:  perl-devel
%endif
BuildRequires:  perl(Test::Warn)
BuildRequires:  perl(Test::Exception)
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}

%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 module 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 module 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 %{module}-%{version}

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

%check
%{__make} test

%install
rm -rf %{buildroot}
%makeinstall_std

%clean 
rm -rf %{buildroot}

%files 
%defattr(-,root,root)
%doc README
%{perl_vendorlib}/UNIVERSAL
%{_mandir}/*/*



%changelog
* Wed Jul 23 2008 Thierry Vignaud <tvignaud@mandriva.com> 1.12-6mdv2009.0
+ Revision: 242108
- rebuild
- kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Sat Sep 15 2007 Guillaume Rousse <guillomovitch@mandriva.org> 1.12-4mdv2008.0
+ Revision: 87065
- rebuild


* Tue Aug 29 2006 Guillaume Rousse <guillomovitch@mandriva.org> 1.12-3mdv2007.0
- Rebuild

* Fri Apr 28 2006 Nicolas Lécureuil <neoclust@mandriva.org> 1.12-2mdk
- Fix SPEC according to Perl Policy
    - BuildRequires
    - Source URL

* Sat Apr 01 2006 Guillaume Rousse <guillomovitch@mandriva.org> 1.12-1mdk
- New release 1.12

* Wed Mar 01 2006 Guillaume Rousse <guillomovitch@mandriva.org> 1.11-1mdk
- New release 1.11

* Mon Jan 16 2006 Guillaume Rousse <guillomovitch@mandriva.org> 1.03-1mdk
- New release 1.03

* Tue Dec 20 2005 Nicolas Lécureuil <neoclust@mandriva.org> 1.01-2mdk
- Add BuildRequires

* Thu Dec 15 2005 Guillaume Rousse <guillomovitch@mandriva.org> 1.01-1mdk
- New release 1.01

* Mon Oct 03 2005 Nicolas Lécureuil <neoclust@mandriva.org> 1.00-2mdk
- Fix BuildRequires

* Tue Sep 20 2005 Guillaume Rousse <guillomovitch@mandriva.org> 1.00-1mdk
- first mdk release