Hello community,
here is the log from the commit of package perl-Devel-StackTrace for
openSUSE:Factory checked in at 2013-06-07 10:06:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Devel-StackTrace (Old)
and /work/SRC/openSUSE:Factory/.perl-Devel-StackTrace.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Devel-StackTrace"
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Devel-StackTrace/perl-Devel-StackTrace.changes
2011-11-21 12:39:16.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.perl-Devel-StackTrace.new/perl-Devel-StackTrace.changes
2013-06-07 10:06:22.000000000 +0200
@@ -1,0 +2,17 @@
+Tue Jun 4 08:33:17 UTC 2013 - [email protected]
+
+- updated to 1.30
+ - There was an eval which did not first localize $@ and $SIG{__DIE__}. This
+ broke Plack::Middleware::StackTrace (and possibly other tihngs).
+
+ - The Devel::StackTrace->frames() method is now read-write. This allows you to
+ do more complex filtering of frames than is easily possible with the
+ frame_filter argument to the constructor. Patch by David Cantrell.
+
+ - Allow arguments to a trace's as_string method, specifically max_arg_length
+ Patch by Ricardo Signes.
+
+ - Added a no_args option to the constructor in 1.26 but forgot to mention it
+ in Changes. Requested by Scott J. Miller. RT #71482.
+
+-------------------------------------------------------------------
Old:
----
Devel-StackTrace-1.27.tar.gz
New:
----
Devel-StackTrace-1.30.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Devel-StackTrace.spec ++++++
--- /var/tmp/diff_new_pack.9GX4N3/_old 2013-06-07 10:06:22.000000000 +0200
+++ /var/tmp/diff_new_pack.9GX4N3/_new 2013-06-07 10:06:22.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Devel-StackTrace
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 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
@@ -16,31 +16,24 @@
#
-
Name: perl-Devel-StackTrace
-Version: 1.27
-Release: 1
-License: Artistic-2.0
+Version: 1.30
+Release: 0
%define cpan_name Devel-StackTrace
Summary: An object representing a stack trace
-Url: http://search.cpan.org/dist/Devel-StackTrace/
+License: Artistic-2.0
Group: Development/Libraries/Perl
-#Source:
http://www.cpan.org/authors/id/D/DR/DROLSKY/Devel-StackTrace-%{version}.tar.gz
-Source: %{cpan_name}-%{version}.tar.gz
-Patch: %{cpan_name}-1.27_Test_More.patch
-%if 0%{?sles_version} == 10
-BuildRequires: perl(Test::More)
-%else
-BuildRequires: perl(Test::More) >= 0.88
-%endif
-BuildRequires: perl(File::Spec)
-BuildRequires: perl(Scalar::Util)
+Url: http://search.cpan.org/dist/Devel-StackTrace/
+Source:
http://www.cpan.org/authors/id/D/DR/DROLSKY/%{cpan_name}-%{version}.tar.gz
+BuildArch: noarch
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
-Requires: perl(File::Spec)
-Requires: perl(Scalar::Util)
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildArch: noarch
+BuildRequires: perl(Test::More) >= 0.88
+#BuildRequires: perl(Devel::StackTrace)
+#BuildRequires: perl(Devel::StackTrace::Frame)
+#BuildRequires: perl(Test::Pod::Coverage) >= 1.04
+#BuildRequires: perl(Test::Spelling)
%{perl_requires}
%description
@@ -58,13 +51,6 @@
%prep
%setup -q -n %{cpan_name}-%{version}
-%if 0%{?suse_version} <= 1120
-%patch -p1
-# disable failing test
-%{__mv} t/05-back-compat.t t/05-back-compat.tdis
-# fix MakeMaker deps
-%{__perl} -p -i -e 's|use ExtUtils::MakeMaker 6.31;|use ExtUtils::MakeMaker
6.30;|' Makefile.PL
-%endif
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
@@ -78,11 +64,8 @@
%perl_process_packlist
%perl_gen_filelist
-%clean
-%{__rm} -rf %{buildroot}
-
%files -f %{name}.files
-%defattr(644,root,root,755)
-%doc Changes LICENSE README SIGNATURE
+%defattr(-,root,root,755)
+%doc Changes LICENSE README
%changelog
++++++ Devel-StackTrace-1.27.tar.gz -> Devel-StackTrace-1.30.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/Changes
new/Devel-StackTrace-1.30/Changes
--- old/Devel-StackTrace-1.27/Changes 2011-01-16 19:57:14.000000000 +0100
+++ new/Devel-StackTrace-1.30/Changes 2012-11-20 06:06:36.000000000 +0100
@@ -1,3 +1,25 @@
+1.30 2012-11-19
+
+- There was an eval which did not first localize $@ and $SIG{__DIE__}. This
+ broke Plack::Middleware::StackTrace (and possibly other tihngs).
+
+
+1.29 2012-11-16
+
+- The Devel::StackTrace->frames() method is now read-write. This allows you to
+ do more complex filtering of frames than is easily possible with the
+ frame_filter argument to the constructor. Patch by David Cantrell.
+
+
+1.28 2012-11-16
+
+- Allow arguments to a trace's as_string method, specifically max_arg_length
+ Patch by Ricardo Signes.
+
+- Added a no_args option to the constructor in 1.26 but forgot to mention it
+ in Changes. Requested by Scott J. Miller. RT #71482.
+
+
1.27 2011-01-16
- Skip some tests on 5.13.8+ that are no longer relevant because of a change
@@ -248,7 +270,7 @@
- Doc tweaks.
-0.85
+0.85 2000-09-02
- doc bug fix that made it seem like args method was only available
under Perl 5.6.0
@@ -256,14 +278,14 @@
- converted objects from pseudo-hashes to regular hashes.
-0.8
+0.8 2000-09-02
- Should work under Perl 5.6.0+.
- Added hints & bitmask methods for use under Perl 5.6.0.
-0.75
+0.75 2000-06-29
- Added frames method (and docs for it).
@@ -271,3 +293,7 @@
- DOCS: explanation of 'top' and 'bottom' as they refer to the stack.
+
+0.7 2000-06-27
+
+- First release (I think)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/LICENSE
new/Devel-StackTrace-1.30/LICENSE
--- old/Devel-StackTrace-1.27/LICENSE 2011-01-16 19:57:14.000000000 +0100
+++ new/Devel-StackTrace-1.30/LICENSE 2012-11-20 06:06:36.000000000 +0100
@@ -1,4 +1,4 @@
-This software is Copyright (c) 2011 by Dave Rolsky.
+This software is Copyright (c) 2012 by Dave Rolsky.
This is free software, licensed under:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/MANIFEST
new/Devel-StackTrace-1.30/MANIFEST
--- old/Devel-StackTrace-1.27/MANIFEST 2011-01-16 19:57:14.000000000 +0100
+++ new/Devel-StackTrace-1.30/MANIFEST 2012-11-20 06:06:36.000000000 +0100
@@ -6,7 +6,6 @@
META.yml
Makefile.PL
README
-SIGNATURE
dist.ini
lib/Devel/StackTrace.pm
lib/Devel/StackTrace/Frame.pm
@@ -16,9 +15,12 @@
t/04-indent.t
t/05-back-compat.t
t/06-dollar-at.t
+t/07-no-args.t
+t/release-cpan-changes.t
t/release-eol.t
-t/release-kwalitee.t
t/release-no-tabs.t
t/release-pod-coverage.t
+t/release-pod-linkcheck.t
+t/release-pod-no404s.t
t/release-pod-spell.t
-t/release-pod.t
+t/release-pod-syntax.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/META.json
new/Devel-StackTrace-1.30/META.json
--- old/Devel-StackTrace-1.27/META.json 2011-01-16 19:57:14.000000000 +0100
+++ new/Devel-StackTrace-1.30/META.json 2012-11-20 06:06:36.000000000 +0100
@@ -4,7 +4,7 @@
"Dave Rolsky <[email protected]>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.200000, CPAN::Meta::Converter
version 2.102400",
+ "generated_by" : "Dist::Zilla version 4.300028, CPAN::Meta::Converter
version 2.120921",
"license" : [
"artistic_2"
],
@@ -16,18 +16,29 @@
"prereqs" : {
"configure" : {
"requires" : {
- "ExtUtils::MakeMaker" : "6.31"
+ "ExtUtils::MakeMaker" : "6.30"
+ }
+ },
+ "develop" : {
+ "requires" : {
+ "Test::Pod" : "1.41"
}
},
"runtime" : {
"requires" : {
- "File::Spec" : 0,
- "Scalar::Util" : 0
+ "File::Spec" : "0",
+ "Scalar::Util" : "0",
+ "overload" : "0",
+ "perl" : "5.006",
+ "strict" : "0",
+ "warnings" : "0"
}
},
"test" : {
"requires" : {
- "Test::More" : "0.88"
+ "Test::More" : "0.88",
+ "base" : "0",
+ "bytes" : "0"
}
}
},
@@ -38,11 +49,11 @@
"web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Devel-StackTrace"
},
"repository" : {
- "type" : "hg",
- "url" : "http://hg.urth.org/hg/Devel-StackTrace",
- "web" : "http://hg.urth.org/hg/Devel-StackTrace"
+ "type" : "git",
+ "url" : "git://git.urth.org/Devel-StackTrace.git",
+ "web" : "http://git.urth.org/Devel-StackTrace.git"
}
},
- "version" : "1.27"
+ "version" : "1.30"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/META.yml
new/Devel-StackTrace-1.30/META.yml
--- old/Devel-StackTrace-1.27/META.yml 2011-01-16 19:57:14.000000000 +0100
+++ new/Devel-StackTrace-1.30/META.yml 2012-11-20 06:06:36.000000000 +0100
@@ -4,10 +4,12 @@
- 'Dave Rolsky <[email protected]>'
build_requires:
Test::More: 0.88
+ base: 0
+ bytes: 0
configure_requires:
- ExtUtils::MakeMaker: 6.31
+ ExtUtils::MakeMaker: 6.30
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.200000, CPAN::Meta::Converter version
2.102400'
+generated_by: 'Dist::Zilla version 4.300028, CPAN::Meta::Converter version
2.120921'
license: artistic_2
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -16,7 +18,11 @@
requires:
File::Spec: 0
Scalar::Util: 0
+ overload: 0
+ perl: 5.006
+ strict: 0
+ warnings: 0
resources:
bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Devel-StackTrace
- repository: http://hg.urth.org/hg/Devel-StackTrace
-version: 1.27
+ repository: git://git.urth.org/Devel-StackTrace.git
+version: 1.30
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/Makefile.PL
new/Devel-StackTrace-1.30/Makefile.PL
--- old/Devel-StackTrace-1.27/Makefile.PL 2011-01-16 19:57:14.000000000
+0100
+++ new/Devel-StackTrace-1.30/Makefile.PL 2012-11-20 06:06:36.000000000
+0100
@@ -2,32 +2,37 @@
use strict;
use warnings;
+use 5.006;
-
-use ExtUtils::MakeMaker 6.31;
+use ExtUtils::MakeMaker 6.30;
my %WriteMakefileArgs = (
- 'ABSTRACT' => 'An object representing a stack trace',
- 'AUTHOR' => 'Dave Rolsky <[email protected]>',
- 'BUILD_REQUIRES' => {
- 'Test::More' => '0.88'
+ "ABSTRACT" => "An object representing a stack trace",
+ "AUTHOR" => "Dave Rolsky <autarch\@urth.org>",
+ "BUILD_REQUIRES" => {
+ "Test::More" => "0.88",
+ "base" => 0,
+ "bytes" => 0
},
- 'CONFIGURE_REQUIRES' => {
- 'ExtUtils::MakeMaker' => '6.31'
+ "CONFIGURE_REQUIRES" => {
+ "ExtUtils::MakeMaker" => "6.30"
},
- 'DISTNAME' => 'Devel-StackTrace',
- 'EXE_FILES' => [],
- 'LICENSE' => 'artistic_2',
- 'NAME' => 'Devel::StackTrace',
- 'PREREQ_PM' => {
- 'File::Spec' => '0',
- 'Scalar::Util' => '0'
+ "DISTNAME" => "Devel-StackTrace",
+ "EXE_FILES" => [],
+ "LICENSE" => "artistic_2",
+ "NAME" => "Devel::StackTrace",
+ "PREREQ_PM" => {
+ "File::Spec" => 0,
+ "Scalar::Util" => 0,
+ "overload" => 0,
+ "strict" => 0,
+ "warnings" => 0
},
- 'VERSION' => '1.27',
- 'test' => {
- 'TESTS' => 't/*.t'
+ "VERSION" => "1.30",
+ "test" => {
+ "TESTS" => "t/*.t"
}
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/README
new/Devel-StackTrace-1.30/README
--- old/Devel-StackTrace-1.27/README 2011-01-16 19:57:14.000000000 +0100
+++ new/Devel-StackTrace-1.30/README 2012-11-20 06:06:36.000000000 +0100
@@ -1,11 +1,11 @@
This archive contains the distribution Devel-StackTrace,
-version 1.27:
+version 1.30:
An object representing a stack trace
-This software is Copyright (c) 2011 by Dave Rolsky.
+This software is Copyright (c) 2012 by Dave Rolsky.
This is free software, licensed under:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/SIGNATURE
new/Devel-StackTrace-1.30/SIGNATURE
--- old/Devel-StackTrace-1.27/SIGNATURE 2011-01-16 19:57:16.000000000 +0100
+++ new/Devel-StackTrace-1.30/SIGNATURE 1970-01-01 01:00:00.000000000 +0100
@@ -1,46 +0,0 @@
-This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.66.
-
-To verify the content in this distribution, first make sure you have
-Module::Signature installed, then type:
-
- % cpansign -v
-
-It will check each file's integrity, as well as the signature's
-validity. If "==> Signature verified OK! <==" is not displayed,
-the distribution may already have been compromised, and you should
-not run its Makefile.PL or Build.PL.
-
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-SHA1 2e835deff45989b45b5bc1a1608cdbc674579cd2 Changes
-SHA1 0dd1a5b7ce6d39832f3539c41d34a3b43bf88db6 INSTALL
-SHA1 c715d20265d2931c7564fc64abfdc4f8ff33e297 LICENSE
-SHA1 efb3ca90f1284a6a1ca2c90c2e8b2e8c3540c181 MANIFEST
-SHA1 078078c24eb8014c088a7715be3c2bb079e34e99 META.json
-SHA1 af2ceed45a88b907ae0ab738230366b5d5c9bb60 META.yml
-SHA1 52272b4ab9a0fa45d82dece9686856c677662809 Makefile.PL
-SHA1 9849c2cffe01d0353dc307be8ef790da0fd3dc20 README
-SHA1 391358751d2e5b41d3d673c88de17877c2ffa674 dist.ini
-SHA1 cab42c66d98f499dc56e73e056c68d148b283c7f lib/Devel/StackTrace.pm
-SHA1 48ffbdc6ee4496298f4373a44e5db0e9d522da82 lib/Devel/StackTrace/Frame.pm
-SHA1 1ef297d54ff84ea2b7e24e6e351c2107ffda2594 t/01-basic.t
-SHA1 5be358bf46458061956102b8885cee73e970c196 t/02-bad-utf8.t
-SHA1 afa39934e2b6e665cd2994663273af9a477e52b8 t/03-message.t
-SHA1 e3b74665df972492c41a5fc6ea193a8b863584d4 t/04-indent.t
-SHA1 bcd35584775b6d49e1ad7b5a8ad7abc9785d4629 t/05-back-compat.t
-SHA1 fffc3b1c456cf9994855945cc85f9fa905ca618a t/06-dollar-at.t
-SHA1 a032c41ef6887fab1b900669c2d304fab46680e2 t/release-eol.t
-SHA1 961a1e2c92d836c8cad2d34b784cbc75345dec63 t/release-kwalitee.t
-SHA1 455d1dd1867212a665ad5ea4126b572411de300c t/release-no-tabs.t
-SHA1 efadc0fba3c3821f1254c582a2bfd22ea198633d t/release-pod-coverage.t
-SHA1 638a586fa778f89fffe0cf6ccabc5343f56850f0 t/release-pod-spell.t
-SHA1 72f0bea522bc8d101417864fcdacb537474f78bd t/release-pod.t
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.10 (GNU/Linux)
-
-iEYEARECAAYFAk0zP4oACgkQIgMCsV8qvRLdtQCdEdHQCNmdiSep4NkHcgWK+Dhk
-PgMAn1vv7g2uFSoMpGyVORpDzWYOOz7R
-=Hk9a
------END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/dist.ini
new/Devel-StackTrace-1.30/dist.ini
--- old/Devel-StackTrace-1.27/dist.ini 2011-01-16 19:57:14.000000000 +0100
+++ new/Devel-StackTrace-1.30/dist.ini 2012-11-20 06:06:36.000000000 +0100
@@ -2,9 +2,12 @@
author = Dave Rolsky <[email protected]>
license = Artistic_2_0
copyright_holder = Dave Rolsky
-copyright_year = 2011
+copyright_year = 2012
-version = 1.27
+version = 1.30
+
+[NextRelease]
+format = %-6v %{yyyy-MM-dd}d
[@Basic]
@@ -14,26 +17,24 @@
[MetaResources]
bugtracker.web = http://rt.cpan.org/NoAuth/Bugs.html?Dist=Devel-StackTrace
bugtracker.mailto = [email protected]
-repository.url = http://hg.urth.org/hg/Devel-StackTrace
-repository.web = http://hg.urth.org/hg/Devel-StackTrace
-repository.type = hg
+repository.url = git://git.urth.org/Devel-StackTrace.git
+repository.web = http://git.urth.org/Devel-StackTrace.git
+repository.type = git
[PodWeaver]
[PkgVersion]
-[KwaliteeTests]
-[NoTabsTests]
[EOLTests]
-[Signature]
+[NoTabsTests]
+[PodSyntaxTests]
+[Test::CPAN::Changes]
+[Test::Pod::LinkCheck]
+[Test::Pod::No404s]
[CheckChangeLog]
-[Prereq]
-File::Spec = 0
-Scalar::Util = 0
-
-[Prereq / TestRequires]
-Test::More = 0.88
+[AutoPrereqs]
+skip = ^Test$
-[@Mercurial]
+[@Git]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/lib/Devel/StackTrace/Frame.pm
new/Devel-StackTrace-1.30/lib/Devel/StackTrace/Frame.pm
--- old/Devel-StackTrace-1.27/lib/Devel/StackTrace/Frame.pm 2011-01-16
19:57:14.000000000 +0100
+++ new/Devel-StackTrace-1.30/lib/Devel/StackTrace/Frame.pm 2012-11-20
06:06:36.000000000 +0100
@@ -1,6 +1,6 @@
package Devel::StackTrace::Frame;
-BEGIN {
- $Devel::StackTrace::Frame::VERSION = '1.27';
+{
+ $Devel::StackTrace::Frame::VERSION = '1.30';
}
use strict;
@@ -58,6 +58,7 @@
sub as_string {
my $self = shift;
my $first = shift;
+ my $p = shift;
my $sub = $self->subroutine;
@@ -106,9 +107,14 @@
local $@;
eval {
- if ( $self->{max_arg_length}
- && length $_ > $self->{max_arg_length} ) {
- substr( $_, $self->{max_arg_length} ) = '...';
+ my $max_arg_length
+ = exists $p->{max_arg_length}
+ ? $p->{max_arg_length}
+ : $self->{max_arg_length};
+
+ if ( $max_arg_length
+ && length $_ > $max_arg_length ) {
+ substr( $_, $max_arg_length ) = '...';
}
s/'/\\'/g;
@@ -142,7 +148,7 @@
# ABSTRACT: A single frame in a stack trace
-
+__END__
=pod
@@ -152,7 +158,7 @@
=head1 VERSION
-version 1.27
+version 1.30
=head1 DESCRIPTION
@@ -202,14 +208,10 @@
=head1 COPYRIGHT AND LICENSE
-This software is Copyright (c) 2011 by Dave Rolsky.
+This software is Copyright (c) 2012 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
=cut
-
-
-__END__
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/lib/Devel/StackTrace.pm
new/Devel-StackTrace-1.30/lib/Devel/StackTrace.pm
--- old/Devel-StackTrace-1.27/lib/Devel/StackTrace.pm 2011-01-16
19:57:14.000000000 +0100
+++ new/Devel-StackTrace-1.30/lib/Devel/StackTrace.pm 2012-11-20
06:06:36.000000000 +0100
@@ -1,6 +1,6 @@
package Devel::StackTrace;
-BEGIN {
- $Devel::StackTrace::VERSION = '1.27';
+{
+ $Devel::StackTrace::VERSION = '1.30';
}
use 5.006;
@@ -44,16 +44,28 @@
my $x = 1;
while (
my @c
- = do { package # the newline keeps dzil from adding a version here
- DB; @DB::args = (); caller( $x++ ) }
+ = $self->{no_args}
+ ? caller( $x++ )
+ : do {
+ package # the newline keeps dzil from adding a version here
+ DB;
+ @DB::args = ();
+ caller( $x++ );
+ }
) {
- my @args = @DB::args;
- if ( $self->{no_refs} ) {
- @args = map { ref $_ ? $self->_ref_to_string($_) : $_ } @args;
+ my @args;
+
+ unless ( $self->{no_args} ) {
+ @args = @DB::args;
+
+ if ( $self->{no_refs} ) {
+ @args = map { ref $_ ? $self->_ref_to_string($_) : $_ } @args;
+ }
}
- push @{ $self->{raw} }, {
+ push @{ $self->{raw} },
+ {
caller => \@c,
args => \@args,
};
@@ -90,15 +102,18 @@
}
}
-my $default_filter = sub {1};
+my $default_filter = sub { 1 };
sub _make_frame_filter {
my $self = shift;
my ( @i_pack_re, %i_class );
if ( $self->{ignore_package} ) {
+ local $@;
+ local $SIG{__DIE__};
+
$self->{ignore_package} = [ $self->{ignore_package} ]
- unless UNIVERSAL::isa( $self->{ignore_package}, 'ARRAY' );
+ unless eval { @{ $self->{ignore_package} } };
@i_pack_re
= map { ref $_ ? $_ : qr/^\Q$_\E$/ } @{ $self->{ignore_package} };
@@ -130,18 +145,15 @@
sub _add_frame {
my $self = shift;
my $c = shift;
- my $args = shift;
+ my $p = shift;
# eval and is_require are only returned when applicable under 5.00503.
push @$c, ( undef, undef ) if scalar @$c == 6;
- if ( $self->{no_refs} ) {
- }
-
push @{ $self->{frames} },
Devel::StackTrace::Frame->new(
$c,
- $args,
+ $p,
$self->{respect_overload},
$self->{max_arg_length},
$self->{message},
@@ -191,7 +203,16 @@
sub frames {
my $self = shift;
- $self->_make_frames() if $self->{raw};
+ if (@_) {
+ die
+ "Devel::StackTrace->frames() can only take
Devel::StackTrace::Frame args\n"
+ if grep { !$_->isa('Devel::StackTrace::Frame') } @_;
+
+ $self->{frames} = \@_;
+ }
+ else {
+ $self->_make_frames() if $self->{raw};
+ }
return @{ $self->{frames} };
}
@@ -213,11 +234,12 @@
sub as_string {
my $self = shift;
+ my $p = shift;
my $st = '';
my $first = 1;
foreach my $f ( $self->frames() ) {
- $st .= $f->as_string($first) . "\n";
+ $st .= $f->as_string( $first, $p ) . "\n";
$first = 0;
}
@@ -235,7 +257,7 @@
# ABSTRACT: An object representing a stack trace
-
+__END__
=pod
@@ -245,7 +267,7 @@
=head1 VERSION
-version 1.27
+version 1.30
=head1 SYNOPSIS
@@ -350,6 +372,11 @@
Devel::StackTrace replaces any references with their stringified
representation.
+=item * no_args => $boolean
+
+If this parameter is true, then Devel::StackTrace will not store caller
+arguments in stack trace frames at all.
+
=item * respect_overload => $boolean
By default, Devel::StackTrace will call C<overload::AddrRef()> to get
@@ -360,8 +387,8 @@
=item * max_arg_length => $integer
-By default, Devel::StackTrace will display the entire argument for
-each subroutine call. Setting this parameter causes it to truncate the
+By default, Devel::StackTrace will display the entire argument for each
+subroutine call. Setting this parameter causes truncates each subroutine
argument's string representation if it is longer than this number of
characters.
@@ -402,8 +429,17 @@
=item * $trace->frames
-Returns a list of Devel::StackTrace::Frame objects. The order they are
-returned is from top (most recent) to bottom.
+When this method is called with no arguments, it returns a list of
+L<Devel::StackTrace::Frame> objects. They are returned in order from top (most
+recent) to bottom.
+
+This method can also be used to set the object's frames if you pass it a list
+of L<Devel::StackTrace::Frame> objects objects.
+
+This is useful if you want to filter the list of frames in ways that are more
+complex than can be handled by C<filter_frames>:
+
+ $stacktrace->frames( my_filter( $stacktrace->frames() ) );
=item * $trace->frame ($index)
@@ -415,11 +451,15 @@
Returns the number of frames in the trace object.
-=item * $trace->as_string
+=item * $trace->as_string(\%p)
Calls as_string on each frame from top to bottom, producing output
quite similar to the Carp module's cluck/confess methods.
+The optional C<\%p> parameter only has one useful option. The
+C<max_arg_length> parameter truncates each subroutine argument's string
+representation if it is longer than this number of characters.
+
=back
=head1 SUPPORT
@@ -434,14 +474,10 @@
=head1 COPYRIGHT AND LICENSE
-This software is Copyright (c) 2011 by Dave Rolsky.
+This software is Copyright (c) 2012 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
=cut
-
-
-__END__
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/t/01-basic.t
new/Devel-StackTrace-1.30/t/01-basic.t
--- old/Devel-StackTrace-1.27/t/01-basic.t 2011-01-16 19:57:14.000000000
+0100
+++ new/Devel-StackTrace-1.30/t/01-basic.t 2012-11-20 06:06:36.000000000
+0100
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More;
+use Test::More 0.88;
use Devel::StackTrace;
@@ -313,6 +313,17 @@
EOF
is( $trace->as_string, $trace_text, 'trace text' );
+
+ my $trace_text_1 = <<"EOF";
+Trace begun at $test_file_name line 1021
+main::max_arg_length('abc...') called at $test_file_name line 308
+EOF
+
+ is(
+ $trace->as_string( { max_arg_length => 3 } ),
+ $trace_text_1,
+ 'trace text, max_arg_length = 3',
+ );
}
SKIP:
@@ -359,7 +370,7 @@
my $trace = Filter::foo();
my @frames = $trace->frames();
- is( scalar @frames, 2, 'filtered trace has just 2 frames' );
+ is( scalar @frames, 2, 'frame_filtered trace has just 2 frames' );
is(
$frames[0]->subroutine(), 'Devel::StackTrace::new',
'first subroutine'
@@ -370,6 +381,24 @@
);
}
+{
+ my $trace = FilterAllFrames::a_foo();
+
+ my @frames = $trace->frames();
+ is(
+ scalar @frames, 2,
+ 'after filtering whole list of frames, got just 2 frames'
+ );
+ is(
+ $frames[0]->subroutine(), 'FilterAllFrames::a_bar',
+ 'first subroutine'
+ );
+ is(
+ $frames[1]->subroutine(), 'FilterAllFrames::a_foo',
+ 'second subroutine'
+ );
+}
+
done_testing();
# This means I can move these lines down without constantly fiddling
@@ -501,3 +530,20 @@
return Devel::StackTrace->new(
frame_filter => sub { $_[0]{caller}[3] ne 'Filter::foo' } );
}
+
+package FilterAllFrames;
+
+sub a_foo { b_foo() }
+sub b_foo { a_bar() }
+sub a_bar { b_bar() }
+
+sub b_bar {
+ my $stacktrace = Devel::StackTrace->new();
+ $stacktrace->frames( only_a_frames( $stacktrace->frames() ) );
+ return $stacktrace;
+}
+
+sub only_a_frames {
+ my @frames = @_;
+ return grep { $_->subroutine() =~ /^FilterAllFrames::a/ } @frames;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/t/06-dollar-at.t
new/Devel-StackTrace-1.30/t/06-dollar-at.t
--- old/Devel-StackTrace-1.27/t/06-dollar-at.t 2011-01-16 19:57:14.000000000
+0100
+++ new/Devel-StackTrace-1.30/t/06-dollar-at.t 2012-11-20 06:06:36.000000000
+0100
@@ -5,10 +5,20 @@
use Devel::StackTrace;
-$@ = my $msg = "Don't tread on me";
+{
+ $@ = my $msg = q{Don't tread on me};
-Devel::StackTrace->new->frame(0)->as_string;
+ Devel::StackTrace->new()->frame(0)->as_string();
-is( $@, $msg, '$@ is not overwritten in as_string() method' );
+ is( $@, $msg, '$@ is not overwritten in as_string() method' );
+}
+
+{
+ $@ = my $msg = q{Don't tread on me};
+
+ Devel::StackTrace->new( ignore_package => 'Foo' )->frames();
+
+ is( $@, $msg, '$@ is not overwritten in _make_filter() method' );
+}
done_testing();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/t/07-no-args.t
new/Devel-StackTrace-1.30/t/07-no-args.t
--- old/Devel-StackTrace-1.27/t/07-no-args.t 1970-01-01 01:00:00.000000000
+0100
+++ new/Devel-StackTrace-1.30/t/07-no-args.t 2012-11-20 06:06:36.000000000
+0100
@@ -0,0 +1,45 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+use Devel::StackTrace;
+
+{
+ my $trace = foo( 1, 2 );
+ is_deeply(
+ [ map { [ $_->args() ] } $trace->frames() ],
+ [
+ ['Devel::StackTrace'],
+ [ 3, 4 ],
+ [ 1, 2 ],
+ ],
+ 'trace includes args'
+ );
+
+ $trace = foo( 0, 2 );
+ is_deeply(
+ [ map { [ $_->args() ] } $trace->frames() ],
+ [
+ [],
+ [],
+ [],
+ ],
+ 'trace does not include args'
+ );
+
+}
+
+done_testing();
+
+sub foo {
+ $_[0] ? bar( 3, 4 ) : baz( 3, 4 );
+}
+
+sub bar {
+ return Devel::StackTrace->new();
+}
+
+sub baz {
+ return Devel::StackTrace->new( no_args => 1 );
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/t/release-cpan-changes.t
new/Devel-StackTrace-1.30/t/release-cpan-changes.t
--- old/Devel-StackTrace-1.27/t/release-cpan-changes.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Devel-StackTrace-1.30/t/release-cpan-changes.t 2012-11-20
06:06:36.000000000 +0100
@@ -0,0 +1,15 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate
testing');
+ }
+}
+
+
+use Test::More;
+eval 'use Test::CPAN::Changes';
+plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
+changes_ok();
+done_testing();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/t/release-kwalitee.t
new/Devel-StackTrace-1.30/t/release-kwalitee.t
--- old/Devel-StackTrace-1.27/t/release-kwalitee.t 2011-01-16
19:57:14.000000000 +0100
+++ new/Devel-StackTrace-1.30/t/release-kwalitee.t 1970-01-01
01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-#!perl
-
-BEGIN {
- unless ($ENV{RELEASE_TESTING}) {
- require Test::More;
- Test::More::plan(skip_all => 'these tests are for release candidate
testing');
- }
-}
-
-
-use Test::More;
-
-eval "use Test::Kwalitee";
-plan skip_all => "Test::Kwalitee required for testing kwalitee"
- if $@;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/t/release-pod-linkcheck.t
new/Devel-StackTrace-1.30/t/release-pod-linkcheck.t
--- old/Devel-StackTrace-1.27/t/release-pod-linkcheck.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Devel-StackTrace-1.30/t/release-pod-linkcheck.t 2012-11-20
06:06:36.000000000 +0100
@@ -0,0 +1,28 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate
testing');
+ }
+}
+
+
+use strict;
+use warnings;
+use Test::More;
+
+foreach my $env_skip ( qw(
+ SKIP_POD_LINKCHECK
+) ){
+ plan skip_all => "\$ENV{$env_skip} is set, skipping"
+ if $ENV{$env_skip};
+}
+
+eval "use Test::Pod::LinkCheck";
+if ( $@ ) {
+ plan skip_all => 'Test::Pod::LinkCheck required for testing POD';
+}
+else {
+ Test::Pod::LinkCheck->new->all_pod_ok;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/t/release-pod-no404s.t
new/Devel-StackTrace-1.30/t/release-pod-no404s.t
--- old/Devel-StackTrace-1.27/t/release-pod-no404s.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Devel-StackTrace-1.30/t/release-pod-no404s.t 2012-11-20
06:06:36.000000000 +0100
@@ -0,0 +1,29 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate
testing');
+ }
+}
+
+
+use strict;
+use warnings;
+use Test::More;
+
+foreach my $env_skip ( qw(
+ SKIP_POD_NO404S
+ AUTOMATED_TESTING
+) ){
+ plan skip_all => "\$ENV{$env_skip} is set, skipping"
+ if $ENV{$env_skip};
+}
+
+eval "use Test::Pod::No404s";
+if ( $@ ) {
+ plan skip_all => 'Test::Pod::No404s required for testing POD';
+}
+else {
+ all_pod_files_ok();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/t/release-pod-spell.t
new/Devel-StackTrace-1.30/t/release-pod-spell.t
--- old/Devel-StackTrace-1.27/t/release-pod-spell.t 2011-01-16
19:57:14.000000000 +0100
+++ new/Devel-StackTrace-1.30/t/release-pod-spell.t 2012-11-20
06:06:36.000000000 +0100
@@ -27,5 +27,6 @@
all_pod_files_spelling_ok;
__DATA__
+CPAN
Rolsky
stacktrace
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/t/release-pod-syntax.t
new/Devel-StackTrace-1.30/t/release-pod-syntax.t
--- old/Devel-StackTrace-1.27/t/release-pod-syntax.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Devel-StackTrace-1.30/t/release-pod-syntax.t 2012-11-20
06:06:36.000000000 +0100
@@ -0,0 +1,15 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate
testing');
+ }
+}
+
+use Test::More;
+
+eval "use Test::Pod 1.41";
+plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
+
+all_pod_files_ok();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.27/t/release-pod.t
new/Devel-StackTrace-1.30/t/release-pod.t
--- old/Devel-StackTrace-1.27/t/release-pod.t 2011-01-16 19:57:14.000000000
+0100
+++ new/Devel-StackTrace-1.30/t/release-pod.t 1970-01-01 01:00:00.000000000
+0100
@@ -1,15 +0,0 @@
-
-BEGIN {
- unless ($ENV{RELEASE_TESTING}) {
- require Test::More;
- Test::More::plan(skip_all => 'these tests are for release candidate
testing');
- }
-}
-
-use strict;
-use warnings;
-
-use Test::More;
-use Test::Pod 1.14;
-
-all_pod_files_ok();
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]