Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-Data-Dumper-Perltidy
perl-Data-Dumper-Perltidy.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-Data-Dumper-Perltidy.spec of Package perl-Data-Dumper-Perltidy
# # spec file for package perl-Data-Dumper-Perltidy # # 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-Data-Dumper-Perltidy Version: 0.03 Release: 0 %define cpan_name Data-Dumper-Perltidy Summary: Stringify and pretty print Perl data structures. License: GPL-1.0+ or Artistic-1.0 Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Data-Dumper-Perltidy/ Source: http://www.cpan.org/authors/id/J/JM/JMCNAMARA/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Data::Dumper) BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Perl::Tidy) BuildRequires: perl(Test::More) Requires: perl(Data::Dumper) Requires: perl(Perl::Tidy) Requires: perl(Test::More) %{perl_requires} %description 'Data::Dumper::Perltidy' encapsulates both 'Data::Dumper' and 'Perl::Tidy' to provide a function that stringifies a Perl data structure in a pretty printed format. See the documentation for the Data::Dumper manpage and the Perl::Tidy manpage for further information. Data::Dumper can be used for, among other things, stringifying complex Perl data structures into a format that is suitable for printing and debugging. Perl::Tidy can be used to pretty print Perl code in a consistent and configurable manner. Data::Dumper also provides a certain level of pretty printing via the '$Data::Dumper::Indent' variable but it isn't quite as nice as the Perl::Tidy output. Let's look at an example to see how this module can be used. Say you have a complex data structure that you wish to inspect. You can use the 'Data::Dumper::Perltidy::Dumper()' function as follows (note that the syntax is the same as Data::Dumper): #!/usr/bin/perl -w use strict; use Data::Dumper::Perltidy; my $data = [{ title => 'This is a test header' },{ data_range => [ 0, 0, 3, 9 ] },{ format => 'bold' }]; print Dumper $data; This would print out: $VAR1 = [ { 'title' => 'This is a test header' }, { 'data_range' => [ 0, 0, 3, 9 ] }, { 'format' => 'bold' } ]; By comparison the standard 'Data::Dumper::Dumper()' output would be: $VAR1 = [ { 'title' => 'This is a test header' }, { 'data_range' => [ 0, 0, 3, 9 ] }, { 'format' => 'bold' } ]; Which isn't too bad but if you are used to Perl::Tidy and the the perltidy manpage utility you may prefer the 'Data::Dumper::Perltidy::Dumper()' output. %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 %clean %{__rm} -rf %{buildroot} %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