Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:languages:perl:CPAN-D
perl-Data-SimplePath
perl-Data-SimplePath.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-Data-SimplePath.spec of Package perl-Data-SimplePath
# # spec file for package perl-Data-SimplePath # # 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-SimplePath Version: 0.005 Release: 0 %define cpan_name Data-SimplePath Summary: Path-like access to complex data structures License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Data-SimplePath/ Source0: http://www.cpan.org/authors/id/S/ST/STG/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Test::NoWarnings) BuildRequires: perl(Test::Warn) %{perl_requires} %description This module enables path-like (as in file system path) access to complex data structures of hashes and/or arrays. Not much more to say, see the SYNOPSIS example above... Ok, a few more notes: The data structure may consist of hashes or arrays, to an arbitrary depth, and scalar values. You probably should not try to put blessed arrays or hashes in it, it may lead to unexpected behaviour in some situations. The object containing the data structure exists only to help accessing the contents, you are free to modify the data in any way you want without the provided methods if you like, this will not break the object's behaviour. The methods to access a certain element in the data structure need to know which element to act on (of course), there are two ways of specifying the element: * by key The key is a single string, with parts of the path separated by the (object specific) separator. This is the recommended way to access an element. Note that the methods will normalize the provided key before it is used, see the 'normalize ()' method below. * by path The path is an array containing the parts of the full path, it is basically the key split on the separator string. Empty (or undef) elements are usually ignored when a path is processed. In the following documentation these two terms will be used as described above. Note that the root of the data structure is specified as an empty key (ie. he empty string '''') or an empty array as path. %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
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