8
0

- regenerate with cpanspec to fix license

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Data-Hierarchy?expand=0&rev=19
This commit is contained in:
Stephan Kulow
2011-12-06 11:00:43 +00:00
committed by Git OBS Bridge
parent 5323487497
commit dec1af4511
2 changed files with 47 additions and 20 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Dec 6 10:59:28 UTC 2011 - coolo@suse.com
- regenerate with cpanspec to fix license
-------------------------------------------------------------------
Fri Nov 18 11:08:37 UTC 2011 - coolo@suse.com

View File

@@ -15,30 +15,59 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: perl-Data-Hierarchy
Version: 0.34
Release: 0
%define cpan_name Data-Hierarchy
Summary: Handle data in a hierarchical structure
Version: 0.34
Release: 113
License: CHECK(GPL+ or Artistic)
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Data-Hierarchy/
#Source: http://www.cpan.org/modules/by-module/Data/Data-Hierarchy-%{version}.tar.bz2
Source: %{cpan_name}-%{version}.tar.gz
Source: http://www.cpan.org/authors/id/C/CL/CLKAO/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Test::Exception)
BuildRequires: perl-macros
Requires: perl(Test::Exception)
%{perl_requires}
%description
Data::Hierarchy provides a simple interface for manipulating inheritable
data attached to a hierarchical environment (like a filesystem).
the Data::Hierarchy manpage provides a simple interface for manipulating
inheritable data attached to a hierarchical environment (like a
filesystem).
One use of the Data::Hierarchy manpage is to allow an application to
annotate paths in a real filesystem in a single compact data structure.
However, the hierarchy does not actually need to correspond to an actual
filesystem.
Paths in a hierarchy are referred to in a Unix-like syntax; '"/"' is the
root "directory". (You can specify a different separator character than the
slash when you construct a Data::Hierarchy object.) With the exception of
the root path, paths should never contain trailing slashes. You can
associate properties, which are arbitrary name/value pairs, with any path.
(Properties cannot contain the undefined value.) By default, properties are
inherited by child paths: thus, if you store some data at '/some/path':
$tree->store('/some/path', {color => 'red'});
you can fetch it again at a '/some/path/below/that':
print $tree->get('/some/path/below/that')->{'color'};
# prints red
On the other hand, properties whose names begin with dots are uninherited,
or "sticky":
$tree->store('/some/path', {'.color' => 'blue'});
print $tree->get('/some/path')->{'.color'}; # prints blue
print $tree->get('/some/path/below/that')->{'.color'}; # undefined
Note that you do not need to (and in fact, cannot) explicitly add "files"
or "directories" to the hierarchy; you simply add and delete properties to
paths.
%prep
%setup -q -n %{cpan_name}-%{version}
@@ -52,18 +81,11 @@ data attached to a hierarchical environment (like a filesystem).
%install
%perl_make_install
# do not perl_process_packlist (noarch)
# remove .packlist file
%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
# remove perllocal.pod file
%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib
%perl_process_packlist
%perl_gen_filelist
%clean
%{__rm} -rf %{buildroot}
%files -f %{name}.files
%defattr(-,root,root,-)
%defattr(-,root,root,755)
%doc CHANGES README
%changelog