2011-01-22 19:42:18 +00:00
|
|
|
#
|
2015-04-15 07:05:00 +00:00
|
|
|
# spec file for package perl-Pod-Elemental-PerlMunger
|
2011-01-22 19:42:18 +00:00
|
|
|
#
|
2024-08-25 18:21:27 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2011-01-22 19:42:18 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2023-01-04 15:49:06 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-01-22 19:42:18 +00:00
|
|
|
#
|
|
|
|
|
2015-04-15 07:05:00 +00:00
|
|
|
|
2023-01-04 15:49:06 +00:00
|
|
|
%define cpan_name Pod-Elemental-PerlMunger
|
2011-01-22 19:42:18 +00:00
|
|
|
Name: perl-Pod-Elemental-PerlMunger
|
2024-08-25 18:21:27 +00:00
|
|
|
Version: 0.200.7
|
2015-04-15 07:05:00 +00:00
|
|
|
Release: 0
|
2024-08-25 18:21:27 +00:00
|
|
|
# 0.200007 -> normalize -> 0.200.7
|
|
|
|
%define cpan_version 0.200007
|
2023-01-04 15:49:06 +00:00
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
|
|
Summary: Thing that takes a string of Perl and rewrites its documentation
|
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
2024-08-25 18:21:27 +00:00
|
|
|
Source0: https://cpan.metacpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{cpan_version}.tar.gz
|
2015-07-19 06:08:49 +00:00
|
|
|
Source1: cpanspec.yml
|
2025-08-12 18:16:35 +02:00
|
|
|
Source100: README.md
|
2015-04-15 07:05:00 +00:00
|
|
|
BuildArch: noarch
|
2011-01-22 19:42:18 +00:00
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2023-01-04 15:49:06 +00:00
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.78
|
2015-07-19 06:08:49 +00:00
|
|
|
BuildRequires: perl(List::Util) >= 1.33
|
2015-04-15 07:05:00 +00:00
|
|
|
BuildRequires: perl(Moose)
|
|
|
|
BuildRequires: perl(Moose::Role)
|
|
|
|
BuildRequires: perl(PPI)
|
|
|
|
BuildRequires: perl(Params::Util)
|
|
|
|
BuildRequires: perl(Pod::Elemental) >= 0.103000
|
|
|
|
BuildRequires: perl(Test::More) >= 0.96
|
|
|
|
BuildRequires: perl(namespace::autoclean)
|
2015-07-19 06:08:49 +00:00
|
|
|
Requires: perl(List::Util) >= 1.33
|
2011-01-22 19:42:18 +00:00
|
|
|
Requires: perl(Moose)
|
2015-04-15 07:05:00 +00:00
|
|
|
Requires: perl(Moose::Role)
|
2011-01-22 19:42:18 +00:00
|
|
|
Requires: perl(PPI)
|
2015-04-15 07:05:00 +00:00
|
|
|
Requires: perl(Params::Util)
|
|
|
|
Requires: perl(Pod::Elemental) >= 0.103000
|
|
|
|
Requires: perl(namespace::autoclean)
|
2024-08-25 18:21:27 +00:00
|
|
|
Provides: perl(Pod::Elemental::PerlMunger) = %{version}
|
|
|
|
%undefine __perllib_provides
|
2011-01-22 19:42:18 +00:00
|
|
|
%{perl_requires}
|
|
|
|
|
|
|
|
%description
|
2015-07-19 06:08:49 +00:00
|
|
|
This role is to be included in classes that rewrite the documentation of a
|
|
|
|
Perl document, stripping out all the Pod, munging it, and replacing it into
|
|
|
|
the Perl.
|
|
|
|
|
|
|
|
The only relevant method is 'munge_perl_string', which must be implemented
|
|
|
|
with a different interface than will be exposed.
|
|
|
|
|
|
|
|
When calling the 'munge_perl_string' method, arguments should be passed
|
|
|
|
like this:
|
|
|
|
|
|
|
|
$object->munge_perl_string($perl_string, \%arg);
|
|
|
|
|
|
|
|
'$perl_string' should be a character string containing Perl source code.
|
|
|
|
|
2016-05-25 07:38:40 +00:00
|
|
|
'%arg' may contain any input for the underlying procedure. Defined keys for
|
|
|
|
'%arg' are:
|
|
|
|
|
|
|
|
* filename
|
|
|
|
|
|
|
|
the name of the file whose contents are being munged; optional, used for
|
|
|
|
error messages
|
|
|
|
|
|
|
|
* no_strip_bom
|
|
|
|
|
|
|
|
If given, the BOM character (U+FEFF) won't be stripped from the input.
|
|
|
|
Probably best to leave this one off.
|
2015-07-19 06:08:49 +00:00
|
|
|
|
|
|
|
The method will return a character string containing the rewritten and
|
|
|
|
combined document.
|
|
|
|
|
|
|
|
Classes including this role must implement a 'munge_perl_string' that
|
|
|
|
expects to be called like this:
|
|
|
|
|
|
|
|
$object->munge_perl_string(\%doc, \%arg);
|
|
|
|
|
|
|
|
'%doc' will have two entries:
|
|
|
|
|
|
|
|
ppi - a PPI::Document of the Perl document with all its Pod removed
|
|
|
|
pod - a Pod::Elemental::Document with no transformations yet performed
|
|
|
|
|
|
|
|
This 'munge_perl_string' method should return a hashref in the same format
|
|
|
|
as '%doc'.
|
2011-01-22 19:42:18 +00:00
|
|
|
|
|
|
|
%prep
|
2024-08-25 18:21:27 +00:00
|
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
2011-01-22 19:42:18 +00:00
|
|
|
|
|
|
|
%build
|
2023-01-04 15:49:06 +00:00
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
|
|
%make_build
|
2011-01-22 19:42:18 +00:00
|
|
|
|
|
|
|
%check
|
2023-01-04 15:49:06 +00:00
|
|
|
make test
|
2011-01-22 19:42:18 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
2023-01-04 15:49:06 +00:00
|
|
|
%doc Changes README
|
|
|
|
%license LICENSE
|
2011-01-22 19:42:18 +00:00
|
|
|
|
|
|
|
%changelog
|