Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-XML-Spice
perl-XML-Spice.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-XML-Spice.spec of Package perl-XML-Spice
# # spec file for package perl-XML-Spice # # Copyright (c) 2018 SUSE LINUX 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-XML-Spice Version: 0.05 Release: 0 %define cpan_name XML-Spice Summary: Generating Xml has Never Been so Perly! License: Artistic-1.0 OR GPL-1.0-or-later Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/XML-Spice/ Source0: https://cpan.metacpan.org/authors/id/R/RO/ROBN/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(CPAN::Meta::Requirements) >= 2.120620 BuildRequires: perl(Module::Metadata) BuildRequires: perl(Test::XML) BuildRequires: perl(XML::Tidy::Tiny) Requires: perl(XML::Tidy::Tiny) %{perl_requires} %description XML::Spice is yet another XML generation module. It tries to take some of the pain out of generating XML by making it more like Perl. Unless you've got a really good module for producing XML for your particular use (like a module for interfacing with a specific web service), you've probably found that you end up resorting to code like this: my $xml = q{<foo><bar><baz /></bar><quux /></foo>}; Of course this works great, and you can't beat it for speed, but it quickly becomes difficult to work with. Your syntax highlighting probably just displays it as a giant string. You can't easily see mismatched brackets or other bugs until your code runs and tries to parse the thing. And, once you start adding attributes and character data into the mix, it rapidly moves towards being impossible to read. Instead of this, you could use XML::Spice and write the same thing in Perl: my $xml = foo(bar(baz()), quux()); You'll can add liberal amounts of whitespace to convey structure without it making your output larger. You get Perl checking to make sure that you haven't left anything out. You can use all the power of Perl to generate and include data without having to pepper your code with interpolated strings or concatenation operators. And you get a guarantee that the XML produced is valid. %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 %files -f %{name}.files %defattr(-,root,root,755) %doc Changes README %license LICENSE %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor