2010-09-17 15:27:31 +00:00
|
|
|
#
|
2015-04-19 07:32:08 +00:00
|
|
|
# spec file for package perl-Devel-Trace
|
2010-09-17 15:27:31 +00:00
|
|
|
#
|
2025-07-11 14:13:48 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2010-09-17 15:27:31 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2025-07-11 14:13:48 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2010-09-17 15:27:31 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2025-07-11 14:13:48 +00:00
|
|
|
%define cpan_name Devel-Trace
|
2010-03-22 15:34:05 +00:00
|
|
|
Name: perl-Devel-Trace
|
2025-07-11 14:13:48 +00:00
|
|
|
Version: 0.120.0
|
2015-04-19 07:32:08 +00:00
|
|
|
Release: 0
|
2025-07-11 14:13:48 +00:00
|
|
|
# 0.12 -> normalize -> 0.120.0
|
|
|
|
%define cpan_version 0.12
|
2015-04-19 07:32:08 +00:00
|
|
|
#Upstream: Devel::Trace 0.11 and its source code are hereby placed in the public domain.
|
|
|
|
License: SUSE-Public-Domain
|
2025-07-11 14:13:48 +00:00
|
|
|
Summary: Print out each line before it is executed (like sh -x)
|
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/M/MJ/MJD/%{cpan_name}-%{cpan_version}.tar.gz
|
2015-04-19 07:32:08 +00:00
|
|
|
Source1: cpanspec.yml
|
2025-08-12 18:13:31 +02:00
|
|
|
Source100: README.md
|
2010-09-17 15:27:31 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2025-07-11 14:13:48 +00:00
|
|
|
Provides: perl(Devel::Trace) = %{version}
|
|
|
|
%undefine __perllib_provides
|
2015-04-19 07:32:08 +00:00
|
|
|
%{perl_requires}
|
2010-03-22 15:34:05 +00:00
|
|
|
|
|
|
|
%description
|
2015-04-19 07:32:08 +00:00
|
|
|
If you run your program with 'perl -d:Trace program', this module will
|
|
|
|
print a message to standard error just before each line is executed. For
|
|
|
|
example, if your program looks like this:
|
|
|
|
|
|
|
|
#!/usr/bin/perl
|
2025-07-11 14:13:48 +00:00
|
|
|
|
|
|
|
|
2015-04-19 07:32:08 +00:00
|
|
|
print "Statement 1 at line 4\n";
|
|
|
|
print "Statement 2 at line 5\n";
|
|
|
|
print "Call to sub x returns ", &x(), " at line 6.\n";
|
2025-07-11 14:13:48 +00:00
|
|
|
|
2015-04-19 07:32:08 +00:00
|
|
|
exit 0;
|
2025-07-11 14:13:48 +00:00
|
|
|
|
|
|
|
|
2015-04-19 07:32:08 +00:00
|
|
|
sub x {
|
|
|
|
print "In sub x at line 12.\n";
|
|
|
|
return 13;
|
|
|
|
}
|
2010-03-22 15:34:05 +00:00
|
|
|
|
2015-04-19 07:32:08 +00:00
|
|
|
Then the 'Trace' output will look like this:
|
|
|
|
|
|
|
|
>> ./test:4: print "Statement 1 at line 4\n";
|
|
|
|
>> ./test:5: print "Statement 2 at line 5\n";
|
|
|
|
>> ./test:6: print "Call to sub x returns ", &x(), " at line 6.\n";
|
|
|
|
>> ./test:12: print "In sub x at line 12.\n";
|
|
|
|
>> ./test:13: return 13;
|
|
|
|
>> ./test:8: exit 0;
|
|
|
|
|
|
|
|
This is something like the shell's '-x' option.
|
2010-09-17 15:27:31 +00:00
|
|
|
|
2010-03-22 15:34:05 +00:00
|
|
|
%prep
|
2025-07-11 14:13:48 +00:00
|
|
|
%autosetup -n %{cpan_name}-%{cpan_version} -p1
|
|
|
|
|
|
|
|
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
2010-03-22 15:34:05 +00:00
|
|
|
|
|
|
|
%build
|
2025-07-11 14:13:48 +00:00
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
|
|
%make_build
|
2010-09-17 15:27:31 +00:00
|
|
|
|
|
|
|
%check
|
2025-07-11 14:13:48 +00:00
|
|
|
make test
|
2010-03-22 15:34:05 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
2015-04-19 07:32:08 +00:00
|
|
|
%perl_process_packlist
|
2010-03-22 15:34:05 +00:00
|
|
|
%perl_gen_filelist
|
|
|
|
|
2010-09-17 15:27:31 +00:00
|
|
|
%files -f %{name}.files
|
2010-03-22 15:34:05 +00:00
|
|
|
%doc Changes README sample
|
|
|
|
|
|
|
|
%changelog
|