%define upstream_name Text-ParseWords %define upstream_version 3.31 %{?perl_default_filter} Name: perl-%{upstream_name} Version: %perl_convert_version %{upstream_version} Release: %mkrel 1 Summary: Parse strings containing shell-style quoting License: GPL+ or Artistic Group: Development/Perl Url: https://metacpan.org/release/%{upstream_name} Source0: https://cpan.metacpan.org/modules/by-module/Text/%{upstream_name}-%{upstream_version}.tar.gz BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Scalar::Util) BuildArch: noarch %description The &nested_quotewords() and "ewords() functions accept a delimiter (which can be a regular expression) and a list of lines and then breaks those lines up into a list of words ignoring delimiters that appear inside quotes. "ewords() returns all of the tokens in a single long list, while &nested_quotewords() returns a list of token lists corresponding to the elements of @lines. &parse_line() does tokenizing on a single string. The &*quotewords() functions simply call &parse_line(), so if you're only splitting one line you can call &parse_line() directly and save a function call. The $keep argument is a boolean flag. If true, then the tokens are split on the specified delimiter, but all other characters (quotes, backslashes, etc.) are kept in the tokens. If $keep is false then the &*quotewords() functions remove all quotes and backslashes that are not themselves backslash-escaped or inside of single quotes (i.e., "ewords() tries to interpret these characters just like the Bourne shell). NB: these semantics are significantly different from the original version of this module shipped with Perl 5.000 through 5.004. As an additional feature, $keep may be the keyword "delimiters" which causes the functions to preserve the delimiters in each string as tokens in the token lists, in addition to preserving quote and backslash characters. &shellwords() is written as a special case of "ewords(), and it does token parsing with whitespace as a delimiter-- similar to most Unix shells. %prep %setup -q -n %{upstream_name}-%{upstream_version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor %{make} %check %{make} test %install %make_install %files %doc CHANGES META.json META.yml MYMETA.yml README %{_mandir}/man3/* %perl_vendorlib/* %changelog * Fri Apr 15 2022 tv <tv> 3.310.0-1.mga9 + Revision: 1850181 - update to 3.31 * Sun Mar 20 2022 umeabot <umeabot> 3.300.0-6.mga9 + Revision: 1806376 - Mageia 9 Mass Rebuild * Wed Feb 12 2020 umeabot <umeabot> 3.300.0-5.mga8 + Revision: 1497700 - Mageia 8 Mass Rebuild + wally <wally> - replace deprecated %%makeinstall_std * Wed Sep 19 2018 umeabot <umeabot> 3.300.0-4.mga7 + Revision: 1272107 - Mageia 7 Mass Rebuild * Sun Jun 19 2016 pterjan <pterjan> 3.300.0-3.mga6 + Revision: 1035029 - Rebuild for perl 5.22.2 * Thu Feb 18 2016 umeabot <umeabot> 3.300.0-2.mga6 + Revision: 967368 - Mageia 6 Mass Rebuild * Tue Jun 30 2015 sander85 <sander85> 3.300.0-1.mga6 + Revision: 848768 - update to 3.30 * Wed Oct 15 2014 umeabot <umeabot> 3.290.0-5.mga5 + Revision: 750363 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 3.290.0-4.mga5 + Revision: 686640 - Mageia 5 Mass Rebuild * Mon Feb 10 2014 jquelin <jquelin> 3.290.0-3.mga5 + Revision: 588027 - rebuild after perl 5.18.2 * Sat Oct 19 2013 umeabot <umeabot> 3.290.0-2.mga4 + Revision: 526291 - Mageia 4 Mass Rebuild * Mon Jun 03 2013 jquelin <jquelin> 3.290.0-1.mga4 + Revision: 436455 - update to 3.29 * Wed Mar 27 2013 jquelin <jquelin> 3.270.0-4.mga3 + Revision: 405572 - perl 5.16.3 rebuild * Sun Jan 13 2013 umeabot <umeabot> 3.270.0-3.mga3 + Revision: 374130 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sat Jan 22 2011 jquelin <jquelin> 3.270.0-2.mga1 + Revision: 32481 - mageia rebuild - imported package perl-Text-ParseWords