File perl-IO-All.spec of Package perl-IO-All

# spec file for package perl-IO-All
# Copyright (c) 2014 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-IO-All
Version:        0.79
Release:        0
%define cpan_name IO-All
Summary:        IO::All to Larry Wall!
License:        Artistic-1.0 or GPL-1.0+
Group:          Development/Libraries/Perl
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
Recommends:     perl(File::MimeInfo)
Recommends:     perl(File::ReadBackwards)

IO::All combines all of the best Perl IO modules into a single nifty object
oriented interface to greatly simplify your everyday Perl IO idioms. It
exports a single function called 'io', which returns a new IO::All object.
And that object can do it all!

The IO::All object is a proxy for IO::File, IO::Dir, IO::Socket, Tie::File,
File::Spec, File::Path, File::MimeInfo and File::ReadBackwards; as well as
all the DBM and MLDBM modules. You can use most of the methods found in
these classes and in IO::Handle (which they inherit from). IO::All adds
dozens of other helpful idiomatic methods including file stat and
manipulation functions.

IO::All is pluggable, and modules like the IO::All::LWP manpage and the
IO::All::Mailto manpage add even more functionality. Optionally, every
IO::All object can be tied to itself. This means that you can use most perl
IO builtins on it: readline, <>, getc, print, printf, syswrite, sysread,

The distinguishing magic of IO::All is that it will automatically open (and
close) files, directories, sockets and other IO things for you. You never
need to specify the mode ('<', '>>', etc), since it is determined by the
usage context. That means you can replace this:

    open STUFF, '<', './mystuff'
      or die "Can't open './mystuff' for input:\n$!";
    local $/;
    my $stuff = <STUFF>;
    close STUFF;

with this:

    my $stuff < io './mystuff';

And that is a *good thing*!

%setup -q -n %{cpan_name}-%{version}
find . -type f -print0 | xargs -0 chmod 644

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

%{__make} test


%files -f %{name}.files

openSUSE Build Service is sponsored by