File perl-MooseX-Iterator.spec of Package perl-MooseX-Iterator

# spec file for package perl-MooseX-Iterator
# Copyright (c) 2011 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

Name:           perl-MooseX-Iterator
Version:        0.11
Release:        0
%define cpan_name MooseX-Iterator
Summary:        Iterate over collections
License:        GPL-1.0+ or Artistic-1.0
Group:          Development/Libraries/Perl
Source:         %{cpan_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Moose) >= 0.86
Requires:       perl(Moose) >= 0.86

This is an attempt to add smalltalk-like streams to Moose. It currently
works with ArrayRefs and HashRefs.

* next

  The next method provides the next item in the colletion.

    For arrays it returns the element of the array
    For hashs it returns a pair as a hashref with the keys: key and value

* has_next

  The has_next method is a boolean method that is true if there is another
  item in the colletion after the current item. and falue if there isn't.

* peek

  The peek method returns the next item without moving the state of the
  iterator forward. It returns undef if it is at the end of the collection.

* reset

  Resets the cursor, so you can iterate through the elements again.

%setup -q -n %{cpan_name}-%{version}

%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}

%{__make} test


%{__rm} -rf %{buildroot}

%files -f %{name}.files

openSUSE Build Service is sponsored by