# # spec file for package perl-Data-URIEncode # # Copyright (c) 2016 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-Data-URIEncode Version: 0.11 Release: 8.24 %define cpan_name Data-URIEncode Summary: Allow complex data structures to be encoded using flat URIs License: GPL-1.0+ or Artistic-1.0 Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Data-URIEncode/ Source0: http://www.cpan.org/authors/id/R/RH/RHANDOM/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros %{perl_requires} %description The world of the web works off of URI's. The Query string portion of URIs already support encoding of key/value paired data - they just don't natively allow for for complex data structures. There are modules or encodings that do support arbitrarily complex data structures. JSON, YAML and Data::Dumper all have their own way of encoding complex structures. But then to pass them across the web, you usually still have to URL encode them and pass them via a form parameter. Data::URIEncode allows for encoding and decoding complex (multi level datastructures) using native Query String manipulators (such as CGI.pm). It takes complex data and turns it into a flat hashref which can then be turned into a URI query string using URL encoding. It also takes a flat hashref of data passed in and translates it back to a complex structure. One benefit of using Data::URIEncode is that a standard submission from a standard html form can automatically be translated into complex data even though it arrived in a "flat" form. This somewhat mimics the abilities of XForms without introducing the complexity of XForms. Another benefit is that sparse data can be represented in a more compact form than JSON or YAML are able to provide. However, complex data with long key names will be more verbose as the full data hierarchy must be repeated for each value. %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 %changelog