File perl-App-moduleshere.spec of Package perl-App-moduleshere

#
# spec file for package perl-App-moduleshere
#
# 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-App-moduleshere
Version:        0.08
Release:        0
%define cpan_name App-moduleshere
Summary:        Copy Modules(.Pm) to Cwd or Somewhere
License:        Artistic-1.0 or GPL-1.0+
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/App-moduleshere/
Source0:        http://www.cpan.org/authors/id/S/SU/SUNNAVY/%{cpan_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
Recommends:     perl(File::Copy::Recursive)
%{perl_requires}

%description
This small script('mhere') helps you copy modules to somewhere you like.
The precedence order is: '-l', env 'APP_MODULES_HERE' and cwd. By default,
it will copy to cwd.

It's first written when I tried to trace a bug in one of my modules which
led me to another module(let's call it 'Foo' here) in '@INC'.

So I ran 'perldoc -l Foo' to find its path, edited it to add more debug
info, forced save it(happy that I had the write permission), then
reproduced the bug to go on debugging, and so on.

After fixed the bug, I was happy and decided to do something else, I almost
forgot that I changed 'Foo' before! (believe me, I totally forgot it a
couple of times) So I switched to 'Foo', reversed all changed I've made,
and forced save it again.

That was a bad experience so I decided to make a new approach. that is, to
copy relative modules to current working directory and make changes there.
after all done we can just remove it with a clean, untouched '@INC'. The
new one is better, at least for me, wish it can help you too :)

%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 LICENSE README

%changelog
openSUSE Build Service is sponsored by