Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-Getopt-Euclid
perl-Getopt-Euclid.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-Getopt-Euclid.spec of Package perl-Getopt-Euclid
# # spec file for package perl-Getopt-Euclid # # 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 http://bugs.opensuse.org/ # Name: perl-Getopt-Euclid Version: 0.4.5 Release: 0 %define cpan_name Getopt-Euclid Summary: Executable Uniform Command-Line Interface Descriptions License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Getopt-Euclid/ Source: http://www.cpan.org/authors/id/F/FA/FANGLY/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(ExtUtils::MakeMaker) >= 6.36 BuildRequires: perl(Module::Build) BuildRequires: perl(version) Requires: perl(version) Recommends: perl(IO::Pager::Page) %{perl_requires} %description Getopt::Euclid uses your program's own POD documentation to create a powerful command-line argument parser. This ensures that your program's documented interface and its actual interface always agree. The created command-line argument parser includes many features such as argument type checking, required arguments, exclusive arguments, optional arguments with default values, automatic usage message, ... To use the module, simply write the following at the top of your program: use Getopt::Euclid; This will cause Getopt::Euclid to be require'd and its import method will be called. It is important that the import method be allowed to run, so do not invoke Getopt::Euclid in the following manner: # Will not work use Getopt::Euclid (); When the module is loaded within a regular Perl program, it will: * 1. locate any POD in the same *.pl file or its associated *.pod file. * 2. extract information from that POD, most especially from the '=head1 REQUIRED ARGUMENTS' and '=head1 OPTIONS' sections, * 3. build a parser that parses the arguments and options the POD specifies, * 4. remove the command-line arguments from '@ARGV' and parse them, and * 5. put the results in the global '%ARGV' variable (or into specifically named optional variables, if you request that -- see the Exporting option variables manpage). As a special case, if the module is loaded within some other module (i.e. from within a '.pm' file), it still locates and extracts POD information, but instead of parsing '@ARGV' immediately, it caches that information and installs an 'import()' subroutine in the caller module. This new 'import()' acts just like Getopt::Euclid's own import, except that it adds the POD from the caller module to the POD of the callee. All of which just means you can put some or all of your CLI specification in a module, rather than in the application's source file. See the Module interface manpage for more details. %prep %setup -q -n %{cpan_name}-%{version} %build %{__perl} Build.PL installdirs=vendor ./Build build flags=%{?_smp_mflags} %check ./Build test %install ./Build install destdir=%{buildroot} create_packlist=0 %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