# # spec file for package perl-POE-Component-Pluggable # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name POE-Component-Pluggable Name: perl-POE-Component-Pluggable Version: 1.280.0 Release: 0 # 1.28 -> normalize -> 1.280.0 %define cpan_version 1.28 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Base class for creating plugin-enabled POE Components URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/B/BI/BINGOS/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(ExtUtils::MakeMaker) >= 6.59 BuildRequires: perl(POE) >= 1.004 BuildRequires: perl(Task::Weaken) BuildRequires: perl(constant) >= 1.17 Requires: perl(POE) >= 1.004 Requires: perl(Task::Weaken) Requires: perl(constant) >= 1.17 Provides: perl(POE::Component::Pluggable) = %{version} Provides: perl(POE::Component::Pluggable::Constants) = %{version} Provides: perl(POE::Component::Pluggable::Pipeline) = %{version} %undefine __perllib_provides %{perl_requires} %description POE::Component::Pluggable is a base class for creating plugin enabled POE Components. It is a generic port of POE::Component::IRC's plugin system. If your component dispatches events to registered POE sessions, then POE::Component::Pluggable may be a good fit for you. Basic use would involve subclassing POE::Component::Pluggable, then overriding '_pluggable_event()' and inserting '_pluggable_process()' wherever you dispatch events from. Users of your component can then load plugins using the plugin methods provided to handle events generated by the component. You may also use plugin style handlers within your component as '_pluggable_process()' will attempt to process any events with local method calls first. The return value of these handlers has the same significance as the return value of 'normal' plugin handlers. %prep %autosetup -n %{cpan_name}-%{cpan_version} %build perl Makefile.PL INSTALLDIRS=vendor %make_build %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %doc Changes examples README %license LICENSE %changelog