%define upstream_name MooseX-NonMoose %define upstream_version 0.22 Name: perl-%{upstream_name} Version: %perl_convert_version %{upstream_version} Release: %mkrel 2 Summary: Constructor method trait for L<MooseX::NonMoose> License: GPL+ or Artistic Group: Development/Perl Url: http://search.cpan.org/dist/%{upstream_name} Source0: http://www.cpan.org/modules/by-module/MooseX/%{upstream_name}-%{upstream_version}.tar.gz BuildRequires: perl(ExtUtils::MakeMaker) >= 6.300.0 BuildRequires: perl(List::MoreUtils) BuildRequires: perl(Moose) >= 1.150.0 BuildRequires: perl(Test::Fatal) BuildRequires: perl(Test::More) >= 0.880.0 BuildArch: noarch %description 'MooseX::NonMoose' allows for easily subclassing non-Moose classes with Moose, taking care of the annoying details connected with doing this, such as setting up proper inheritance from the Moose::Object manpage and installing (and inlining, at 'make_immutable' time) a constructor that makes sure things like 'BUILD' methods are called. It tries to be as non-intrusive as possible - when this module is used, inheriting from non-Moose classes and inheriting from Moose classes should work identically, aside from the few caveats mentioned below. One of the goals of this module is that including it in a the Moose::Exporter manpage-based package used across an entire application should be possible, without interfering with classes that only inherit from Moose modules, or even classes that don't inherit from anything at all. There are several ways to use this module. The most straightforward is to just 'use MooseX::NonMoose;' in your class; this should set up everything necessary for extending non-Moose modules. the MooseX::NonMoose::Meta::Role::Class manpage and the MooseX::NonMoose::Meta::Role::Constructor manpage can also be applied to your metaclasses manually, either by passing a '-traits' option to your 'use Moose;' line, or by applying them using the Moose::Util::MetaRole manpage in a the Moose::Exporter manpage-based package. the MooseX::NonMoose::Meta::Role::Class manpage is the part that provides the main functionality of this module; if you don't care about inlining, this is all you need to worry about. Applying the MooseX::NonMoose::Meta::Role::Constructor manpage as well will provide an inlined constructor when you immutabilize your class. 'MooseX::NonMoose' allows you to manipulate the argument list that gets passed to the superclass constructor by defining a 'FOREIGNBUILDARGS' method. This is called with the same argument list as the 'BUILDARGS' method, but should return a list of arguments to pass to the superclass constructor. This allows 'MooseX::NonMoose' to support superclasses whose constructors would get confused by the extra arguments that Moose requires (for attributes, etc.) %prep %setup -q -n %{upstream_name}-%{upstream_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 Changes LICENSE META.json META.yml README %{_mandir}/man3/* %perl_vendorlib/* %changelog * Sun Jan 13 2013 umeabot <umeabot> 0.220.0-2.mga3 + Revision: 370209 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Wed Jun 15 2011 jquelin <jquelin> 0.220.0-1.mga2 + Revision: 107140 - update to 0.22 * Thu Mar 24 2011 jquelin <jquelin> 0.200.0-1.mga1 + Revision: 76656 - update to 0.20 * Wed Mar 09 2011 jquelin <jquelin> 0.190.0-1.mga1 + Revision: 67002 - update to 0.19 * Wed Feb 16 2011 jquelin <jquelin> 0.180.0-1.mga1 + Revision: 52596 - update to 0.18 * Thu Jan 27 2011 jquelin <jquelin> 0.170.0-1.mga1 + Revision: 41870 - imported package perl-MooseX-NonMoose