From a0a73c8b02df5316201c37ed7c0b3c0e0c28ab6c38e40dcdb22db26f67d7dd77 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 17 Jan 2011 20:56:45 +0000 Subject: [PATCH] - initial package 0.102082 * created by cpanspec 1.78.03 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-String-Formatter?expand=0&rev=1 --- .gitattributes | 23 ++++++ .gitignore | 1 + String-Formatter-0.102082.tar.bz2 | 3 + perl-String-Formatter.changes | 6 ++ perl-String-Formatter.spec | 112 ++++++++++++++++++++++++++++++ 5 files changed, 145 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 String-Formatter-0.102082.tar.bz2 create mode 100644 perl-String-Formatter.changes create mode 100644 perl-String-Formatter.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/String-Formatter-0.102082.tar.bz2 b/String-Formatter-0.102082.tar.bz2 new file mode 100644 index 0000000..48899d8 --- /dev/null +++ b/String-Formatter-0.102082.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41cefa7c63b970259c98014136a2dc51497ceaaf0570d5aa9a9c0ebc0c46168e +size 16412 diff --git a/perl-String-Formatter.changes b/perl-String-Formatter.changes new file mode 100644 index 0000000..16224ea --- /dev/null +++ b/perl-String-Formatter.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Mon Jan 17 20:53:26 UTC 2011 - coolo@novell.com + +- initial package 0.102082 + * created by cpanspec 1.78.03 + diff --git a/perl-String-Formatter.spec b/perl-String-Formatter.spec new file mode 100644 index 0000000..eec4c6a --- /dev/null +++ b/perl-String-Formatter.spec @@ -0,0 +1,112 @@ +# +# spec file for package perl-String-Formatter (Version 0.102082) +# +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# 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 http://bugs.opensuse.org/ +# + +Name: perl-String-Formatter +Version: 0.102082 +Release: 1 +License: GPL+ +%define cpan_name String-Formatter +Summary: build sprintf-like functions of your own +Url: http://search.cpan.org/dist/String-Formatter/ +Group: Development/Libraries/Perl +#Source: http://www.cpan.org/authors/id/R/RJ/RJBS/String-Formatter-%{version}.tar.gz +Source: %{cpan_name}-%{version}.tar.bz2 +BuildRequires: perl(Params::Util) +BuildRequires: perl(Sub::Exporter) +BuildRequires: perl +BuildRequires: perl-macros +Requires: perl(Params::Util) +Requires: perl(Sub::Exporter) +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch +%{perl_requires} + +%description +String::Formatter is a tool for building sprintf-like formatting routines. +It supports named or positional formatting, custom conversions, fixed +string interpolation, and simple width-matching out of the box. It is easy +to alter its behavior to write new kinds of format string expanders. For +most cases, it should be easy to build all sorts of formatters out of the +options built into String::Formatter. + +Normally, String::Formatter will be used to import a sprintf-like routine +referred to as "'stringf'", but which can be given any name you like. This +routine acts like sprintf in that it takes a string and some inputs and +returns a new string: + + my $output = stringf "Some %a format %s for you to %u.\n", { ... }; + +This routine is actually a wrapper around a String::Formatter object +created by importing stringf. In the following code, the entire hashref +after "stringf" is passed to String::Formatter's constructor (the 'new' +method), save for the '-as' key and any other keys that start with a dash. + + use String::Formatter + stringf => { + -as => 'fmt_time', + codes => { ... }, + format_hunker => ..., + input_processor => ..., + }, + stringf => { + -as => 'fmt_date', + codes => { ... }, + string_replacer => ..., + hunk_formatter => ..., + }, + ; + +As you can see, this will generate two stringf routines, with different +behaviors, which are installed with different names. Since the behavior of +these routines is based on the 'format' method of a String::Formatter +object, the rest of the documentation will describe the way the object +behaves. + +There's also a 'named_stringf' export, which behaves just like the +'stringf' export, but defaults to the 'named_replace' and +'require_named_input' arguments. There's a 'method_stringf' export, which +defaults 'method_replace' and 'require_single_input'. Finally, a +'indexed_stringf', which defaults to 'indexed_replaced' and +'require_arrayref_input'. For more on these, keep reading, and check out +the cookbook. + +the String::Formatter::Cookbook manpage provides a number of recipes for +ways to put String::Formatter to use. + +%prep +%setup -q -n %{cpan_name}-%{version} + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor +%{__make} %{?_smp_mflags} + +%check +%{__make} test + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%clean +%{__rm} -rf %{buildroot} + +%files -f %{name}.files +%defattr(644,root,root,755) +%doc Changes dist.ini LICENSE README + +%changelog