Hello community,
here is the log from the commit of package perl-Devel-StackTrace for
openSUSE:Factory checked in at 2014-02-24 14:12:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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
2013-06-07 10:06:22.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Devel-StackTrace.new/perl-Devel-StackTrace.changes
2014-02-24 14:12:23.000000000 +0100
@@ -1,0 +2,8 @@
+Mon Feb 24 06:08:43 UTC 2014 - [email protected]
+
+- updated to 1.31
+ - No code changes, just doc updates, including documenting the as_string()
+ method in Devel::StackTrace::Frame. Requested by Skef. RT #91575.
+- remove Devel-StackTrace-1.27_Test_More.patch
+
+-------------------------------------------------------------------
Old:
----
Devel-StackTrace-1.27_Test_More.patch
Devel-StackTrace-1.30.tar.gz
New:
----
Devel-StackTrace-1.31.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Devel-StackTrace.spec ++++++
--- /var/tmp/diff_new_pack.DrX9dC/_old 2014-02-24 14:12:24.000000000 +0100
+++ /var/tmp/diff_new_pack.DrX9dC/_new 2014-02-24 14:12:24.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-Devel-StackTrace
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# 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
@@ -17,7 +17,7 @@
Name: perl-Devel-StackTrace
-Version: 1.30
+Version: 1.31
Release: 0
%define cpan_name Devel-StackTrace
Summary: An object representing a stack trace
@@ -30,24 +30,21 @@
BuildRequires: perl
BuildRequires: perl-macros
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
-The Devel::StackTrace module contains two classes, Devel::StackTrace and
-Devel::StackTrace::Frame. The goal of this object is to encapsulate the
-information that can found through using the caller() function, as well as
+The 'Devel::StackTrace' module contains two classes, C,Devel::StackTrace>
+and the Devel::StackTrace::Frame manpage. These objects encapsulate the
+information that can retrieved via Perl's 'caller()' function, as well as
providing a simple interface to this data.
-The Devel::StackTrace object contains a set of Devel::StackTrace::Frame
+The 'Devel::StackTrace' object contains a set of 'Devel::StackTrace::Frame'
objects, one for each level of the stack. The frames contain all the data
available from 'caller()'.
This code was created to support my the Exception::Class::Base manpage
-class (part of Exception::Class) but may be useful in other contexts.
+class (part of the Exception::Class manpage) but may be useful in other
+contexts.
%prep
%setup -q -n %{cpan_name}-%{version}
++++++ Devel-StackTrace-1.30.tar.gz -> Devel-StackTrace-1.31.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/Changes
new/Devel-StackTrace-1.31/Changes
--- old/Devel-StackTrace-1.30/Changes 2012-11-20 06:06:36.000000000 +0100
+++ new/Devel-StackTrace-1.31/Changes 2014-01-16 23:35:53.000000000 +0100
@@ -1,3 +1,9 @@
+1.31 2014-01-16
+
+- No code changes, just doc updates, including documenting the as_string()
+ method in Devel::StackTrace::Frame. Requested by Skef. RT #91575.
+
+
1.30 2012-11-19
- There was an eval which did not first localize $@ and $SIG{__DIE__}. This
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/LICENSE
new/Devel-StackTrace-1.31/LICENSE
--- old/Devel-StackTrace-1.30/LICENSE 2012-11-20 06:06:36.000000000 +0100
+++ new/Devel-StackTrace-1.31/LICENSE 2014-01-16 23:35:53.000000000 +0100
@@ -1,4 +1,4 @@
-This software is Copyright (c) 2012 by Dave Rolsky.
+This software is Copyright (c) 2014 by Dave Rolsky.
This is free software, licensed under:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/MANIFEST
new/Devel-StackTrace-1.31/MANIFEST
--- old/Devel-StackTrace-1.30/MANIFEST 2012-11-20 06:06:36.000000000 +0100
+++ new/Devel-StackTrace-1.31/MANIFEST 2014-01-16 23:35:53.000000000 +0100
@@ -1,3 +1,4 @@
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest
v5.012.
Changes
INSTALL
LICENSE
@@ -9,6 +10,7 @@
dist.ini
lib/Devel/StackTrace.pm
lib/Devel/StackTrace/Frame.pm
+t/00-compile.t
t/01-basic.t
t/02-bad-utf8.t
t/03-message.t
@@ -16,11 +18,12 @@
t/05-back-compat.t
t/06-dollar-at.t
t/07-no-args.t
+t/author-pod-spell.t
t/release-cpan-changes.t
t/release-eol.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-syntax.t
+t/release-synopsis.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/META.json
new/Devel-StackTrace-1.31/META.json
--- old/Devel-StackTrace-1.30/META.json 2012-11-20 06:06:36.000000000 +0100
+++ new/Devel-StackTrace-1.31/META.json 2014-01-16 23:35:53.000000000 +0100
@@ -4,7 +4,7 @@
"Dave Rolsky <[email protected]>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.300028, CPAN::Meta::Converter
version 2.120921",
+ "generated_by" : "Dist::Zilla version 5.012, CPAN::Meta::Converter version
2.120921",
"license" : [
"artistic_2"
],
@@ -21,7 +21,9 @@
},
"develop" : {
"requires" : {
- "Test::Pod" : "1.41"
+ "Pod::Coverage::TrustPod" : "0",
+ "Test::Pod" : "1.41",
+ "Test::Pod::Coverage" : "1.08"
}
},
"runtime" : {
@@ -36,6 +38,9 @@
},
"test" : {
"requires" : {
+ "File::Find" : "0",
+ "File::Temp" : "0",
+ "Test" : "0",
"Test::More" : "0.88",
"base" : "0",
"bytes" : "0"
@@ -46,14 +51,23 @@
"resources" : {
"bugtracker" : {
"mailto" : "[email protected]",
- "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Devel-StackTrace"
+ "web" :
"http://rt.cpan.org/Public/Dist/Display.html?Name=Devel-StackTrace"
},
+ "homepage" : "http://metacpan.org/release/Devel-StackTrace",
"repository" : {
"type" : "git",
"url" : "git://git.urth.org/Devel-StackTrace.git",
"web" : "http://git.urth.org/Devel-StackTrace.git"
}
},
- "version" : "1.30"
+ "version" : "1.31",
+ "x_authority" : "cpan:DROLSKY",
+ "x_contributors" : [
+ "David Cantrell <[email protected]>",
+ "Ricardo Signes <[email protected]>",
+ "autarch <devnull@localhost>",
+ "convert-repo <devnull@localhost>",
+ "unknown <devnull@localhost>"
+ ]
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/META.yml
new/Devel-StackTrace-1.31/META.yml
--- old/Devel-StackTrace-1.30/META.yml 2012-11-20 06:06:36.000000000 +0100
+++ new/Devel-StackTrace-1.31/META.yml 2014-01-16 23:35:53.000000000 +0100
@@ -3,13 +3,16 @@
author:
- 'Dave Rolsky <[email protected]>'
build_requires:
+ File::Find: 0
+ File::Temp: 0
+ Test: 0
Test::More: 0.88
base: 0
bytes: 0
configure_requires:
ExtUtils::MakeMaker: 6.30
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.300028, CPAN::Meta::Converter version
2.120921'
+generated_by: 'Dist::Zilla version 5.012, CPAN::Meta::Converter version
2.120921'
license: artistic_2
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -23,6 +26,14 @@
strict: 0
warnings: 0
resources:
- bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Devel-StackTrace
+ bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Devel-StackTrace
+ homepage: http://metacpan.org/release/Devel-StackTrace
repository: git://git.urth.org/Devel-StackTrace.git
-version: 1.30
+version: 1.31
+x_authority: cpan:DROLSKY
+x_contributors:
+ - 'David Cantrell <[email protected]>'
+ - 'Ricardo Signes <[email protected]>'
+ - 'autarch <devnull@localhost>'
+ - 'convert-repo <devnull@localhost>'
+ - 'unknown <devnull@localhost>'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/Makefile.PL
new/Devel-StackTrace-1.31/Makefile.PL
--- old/Devel-StackTrace-1.30/Makefile.PL 2012-11-20 06:06:36.000000000
+0100
+++ new/Devel-StackTrace-1.31/Makefile.PL 2014-01-16 23:35:53.000000000
+0100
@@ -1,4 +1,5 @@
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker
v5.012.
use strict;
use warnings;
@@ -11,11 +12,7 @@
my %WriteMakefileArgs = (
"ABSTRACT" => "An object representing a stack trace",
"AUTHOR" => "Dave Rolsky <autarch\@urth.org>",
- "BUILD_REQUIRES" => {
- "Test::More" => "0.88",
- "base" => 0,
- "bytes" => 0
- },
+ "BUILD_REQUIRES" => {},
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => "6.30"
},
@@ -30,24 +27,40 @@
"strict" => 0,
"warnings" => 0
},
- "VERSION" => "1.30",
+ "TEST_REQUIRES" => {
+ "File::Find" => 0,
+ "File::Temp" => 0,
+ "Test" => 0,
+ "Test::More" => "0.88",
+ "base" => 0,
+ "bytes" => 0
+ },
+ "VERSION" => "1.31",
"test" => {
"TESTS" => "t/*.t"
}
);
-unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
- my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
- my $pp = $WriteMakefileArgs{PREREQ_PM};
- for my $mod ( keys %$br ) {
- if ( exists $pp->{$mod} ) {
- $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
- }
- else {
- $pp->{$mod} = $br->{$mod};
- }
- }
+my %FallbackPrereqs = (
+ "File::Find" => 0,
+ "File::Spec" => 0,
+ "File::Temp" => 0,
+ "Scalar::Util" => 0,
+ "Test" => 0,
+ "Test::More" => "0.88",
+ "base" => 0,
+ "bytes" => 0,
+ "overload" => 0,
+ "strict" => 0,
+ "warnings" => 0
+);
+
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
+ delete $WriteMakefileArgs{TEST_REQUIRES};
+ delete $WriteMakefileArgs{BUILD_REQUIRES};
+ $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/README
new/Devel-StackTrace-1.31/README
--- old/Devel-StackTrace-1.30/README 2012-11-20 06:06:36.000000000 +0100
+++ new/Devel-StackTrace-1.31/README 2014-01-16 23:35:53.000000000 +0100
@@ -1,14 +1,197 @@
+NAME
+ Devel::StackTrace - An object representing a stack trace
+VERSION
+ version 1.31
-This archive contains the distribution Devel-StackTrace,
-version 1.30:
+SYNOPSIS
+ use Devel::StackTrace;
- An object representing a stack trace
+ my $trace = Devel::StackTrace->new();
-This software is Copyright (c) 2012 by Dave Rolsky.
+ print $trace->as_string(); # like carp
-This is free software, licensed under:
+ # from top (most recent) of stack to bottom.
+ while ( my $frame = $trace->next_frame() ) {
+ print "Has args\n" if $frame->hasargs();
+ }
- The Artistic License 2.0 (GPL Compatible)
+ # from bottom (least recent) of stack to top.
+ while ( my $frame = $trace->prev_frame() ) {
+ print "Sub: ", $frame->subroutine(), "\n";
+ }
+DESCRIPTION
+ The "Devel::StackTrace" module contains two classes,
+ C,Devel::StackTrace> and Devel::StackTrace::Frame. These objects
+ encapsulate the information that can retrieved via Perl's "caller()"
+ function, as well as providing a simple interface to this data.
+
+ The "Devel::StackTrace" object contains a set of
+ "Devel::StackTrace::Frame" objects, one for each level of the stack. The
+ frames contain all the data available from "caller()".
+
+ This code was created to support my Exception::Class::Base class (part
+ of Exception::Class) but may be useful in other contexts.
+
+'TOP' AND 'BOTTOM' OF THE STACK
+ When describing the methods of the trace object, I use the words 'top'
+ and 'bottom'. In this context, the 'top' frame on the stack is the most
+ recent frame and the 'bottom' is the least recent.
+
+ Here's an example:
+
+ foo(); # bottom frame is here
+
+ sub foo {
+ bar();
+ }
+
+ sub bar {
+ Devel::StackTrace->new(); # top frame is here.
+ }
+
+METHODS
+ This class provide the following methods:
+
+ Devel::StackTrace->new(%named_params)
+ Returns a new Devel::StackTrace object.
+
+ Takes the following parameters:
+
+ * frame_filter => $sub
+
+ By default, Devel::StackTrace will include all stack frames before
+ the call to its constructor.
+
+ However, you may want to filter out some frames with more
+ granularity than 'ignore_package' or 'ignore_class' allow.
+
+ You can provide a subroutine which is called with the raw frame data
+ for each frame. This is a hash reference with two keys, "caller",
+ and "args", both of which are array references. The "caller" key is
+ the raw data as returned by Perl's "caller()" function, and the
+ "args" key are the subroutine arguments found in @DB::args.
+
+ The filter should return true if the frame should be included, or
+ false if it should be skipped.
+
+ * ignore_package => $package_name OR \@package_names
+
+ Any frames where the package is one of these packages will not be on
+ the stack.
+
+ * ignore_class => $package_name OR \@package_names
+
+ Any frames where the package is a subclass of one of these packages
+ (or is the same package) will not be on the stack.
+
+ Devel::StackTrace internally adds itself to the 'ignore_package'
+ parameter, meaning that the Devel::StackTrace package is ALWAYS
+ ignored. However, if you create a subclass of Devel::StackTrace it
+ will not be ignored.
+
+ * no_refs => $boolean
+
+ If this parameter is true, then Devel::StackTrace will not store
+ references internally when generating stacktrace frames. This lets
+ your objects go out of scope.
+
+ Devel::StackTrace replaces any references with their stringified
+ representation.
+
+ * no_args => $boolean
+
+ If this parameter is true, then Devel::StackTrace will not store
+ caller arguments in stack trace frames at all.
+
+ * respect_overload => $boolean
+
+ By default, Devel::StackTrace will call "overload::AddrRef()" to get
+ the underlying string representation of an object, instead of
+ respecting the object's stringification overloading. If you would
+ prefer to see the overloaded representation of objects in stack
+ traces, then set this parameter to true.
+
+ * max_arg_length => $integer
+
+ 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.
+
+ * message => $string
+
+ By default, Devel::StackTrace will use 'Trace begun' as the message
+ for the first stack frame when you call "as_string". You can supply
+ an alternative message using this option.
+
+ * indent => $boolean
+
+ If this parameter is true, each stack frame after the first will
+ start with a tab character, just like "Carp::confess()".
+
+ $trace->next_frame()
+ Returns the next Devel::StackTrace::Frame object on the stack, going
+ down. If this method hasn't been called before it returns the first
+ frame. It returns "undef" when it reaches the bottom of the stack and
+ then resets its pointer so the next call to "$trace->next_frame()" or
+ "$trace->prev_frame()" will work properly.
+
+ $trace->prev_frame()
+ Returns the next Devel::StackTrace::Frame object on the stack, going up.
+ If this method hasn't been called before it returns the last frame. It
+ returns undef when it reaches the top of the stack and then resets its
+ pointer so the next call to "$trace->next_frame()" or
+ "$trace->prev_frame()" will work properly.
+
+ $trace->reset_pointer
+ Resets the pointer so that the next call to "$trace->next_frame()" or
+ "$trace->prev_frame()" will start at the top or bottom of the stack, as
+ appropriate.
+
+ $trace->frames()
+ When this method is called with no arguments, it returns a list of
+ 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 Devel::StackTrace::Frame objects.
+
+ This is useful if you want to filter the list of frames in ways that are
+ more complex than can be handled by the "$trace->filter_frames()"
+ method:
+
+ $stacktrace->frames( my_filter( $stacktrace->frames() ) );
+
+ $trace->frame($index)
+ Given an index, this method returns the relevant frame, or undef if
+ there is no frame at that index. The index is exactly like a Perl array.
+ The first frame is 0 and negative indexes are allowed.
+
+ $trace->frame_count()
+ Returns the number of frames in the trace object.
+
+ $trace->as_string(\%p)
+ Calls "$frame->as_string()" on each frame from top to bottom, producing
+ output quite similar to the Carp module's cluck/confess methods.
+
+ The optional "\%p" parameter only has one option. The "max_arg_length"
+ parameter truncates each subroutine argument's string representation if
+ it is longer than this number of characters.
+
+SUPPORT
+ Please submit bugs to the CPAN RT system at
+ http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Devel%3A%3AStackTrace or
+ via email at [email protected].
+
+AUTHOR
+ Dave Rolsky <[email protected]>
+
+COPYRIGHT AND LICENSE
+ This software is Copyright (c) 2014 by Dave Rolsky.
+
+ This is free software, licensed under:
+
+ The Artistic License 2.0 (GPL Compatible)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/dist.ini
new/Devel-StackTrace-1.31/dist.ini
--- old/Devel-StackTrace-1.30/dist.ini 2012-11-20 06:06:36.000000000 +0100
+++ new/Devel-StackTrace-1.31/dist.ini 2014-01-16 23:35:53.000000000 +0100
@@ -2,39 +2,12 @@
author = Dave Rolsky <[email protected]>
license = Artistic_2_0
copyright_holder = Dave Rolsky
-copyright_year = 2012
-version = 1.30
+version = 1.31
-[NextRelease]
-format = %-6v %{yyyy-MM-dd}d
-
-[@Basic]
-
-[InstallGuide]
-[MetaJSON]
-
-[MetaResources]
-bugtracker.web = http://rt.cpan.org/NoAuth/Bugs.html?Dist=Devel-StackTrace
-bugtracker.mailto = [email protected]
-repository.url = git://git.urth.org/Devel-StackTrace.git
-repository.web = http://git.urth.org/Devel-StackTrace.git
-repository.type = git
-
-[PodWeaver]
-
-[PkgVersion]
-
-[EOLTests]
-[NoTabsTests]
-[PodSyntaxTests]
-[Test::CPAN::Changes]
-[Test::Pod::LinkCheck]
-[Test::Pod::No404s]
-
-[CheckChangeLog]
-
-[AutoPrereqs]
-skip = ^Test$
-
-[@Git]
+[@DROLSKY]
+dist = Devel-StackTrace
+next_release_width = 6
+stopwords = CPAN
+stopwords = Rolsky
+stopwords = stacktrace
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/lib/Devel/StackTrace/Frame.pm
new/Devel-StackTrace-1.31/lib/Devel/StackTrace/Frame.pm
--- old/Devel-StackTrace-1.30/lib/Devel/StackTrace/Frame.pm 2012-11-20
06:06:36.000000000 +0100
+++ new/Devel-StackTrace-1.31/lib/Devel/StackTrace/Frame.pm 2014-01-16
23:35:53.000000000 +0100
@@ -1,6 +1,7 @@
package Devel::StackTrace::Frame;
-{
- $Devel::StackTrace::Frame::VERSION = '1.30';
+$Devel::StackTrace::Frame::VERSION = '1.31';
+BEGIN {
+ $Devel::StackTrace::Frame::AUTHORITY = 'cpan:DROLSKY';
}
use strict;
@@ -158,49 +159,51 @@
=head1 VERSION
-version 1.30
+version 1.31
=head1 DESCRIPTION
See L<Devel::StackTrace> for details.
+=for Pod::Coverage new
+
=head1 METHODS
-See the L<caller> documentation for more information on what these
+See Perl's C<caller()> documentation for more information on what these
methods return.
-=over 4
+=head2 $frame->package()
-=item * $frame->package
+=head2 $frame->filename()
-=item * $frame->filename
+=head2 $frame->line()
-=item * $frame->line
+=head2 $frame->subroutine()
-=item * $frame->subroutine
+=head2 $frame->hasargs()
-=item * $frame->hasargs
+=head2 $frame->wantarray()
-=item * $frame->wantarray
-
-=item * $frame->evaltext
+=head2 $frame->evaltext()
Returns undef if the frame was not part of an eval.
-=item * $frame->is_require
+=head2 $frame->is_require()
Returns undef if the frame was not part of a require.
-=item * $frame->args
+=head2 $frame->args()
Returns the arguments passed to the frame. Note that any arguments
that are references are returned as references, not copies.
-=item * $frame->hints
+=head2 $frame->hints()
+
+=head2 $frame->bitmask()
-=item * $frame->bitmask
+=head2 $frame->as_string()
-=back
+Returns a string containing a description of the frame.
=head1 AUTHOR
@@ -208,7 +211,7 @@
=head1 COPYRIGHT AND LICENSE
-This software is Copyright (c) 2012 by Dave Rolsky.
+This software is Copyright (c) 2014 by Dave Rolsky.
This is free software, licensed under:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/lib/Devel/StackTrace.pm
new/Devel-StackTrace-1.31/lib/Devel/StackTrace.pm
--- old/Devel-StackTrace-1.30/lib/Devel/StackTrace.pm 2012-11-20
06:06:36.000000000 +0100
+++ new/Devel-StackTrace-1.31/lib/Devel/StackTrace.pm 2014-01-16
23:35:53.000000000 +0100
@@ -1,6 +1,7 @@
package Devel::StackTrace;
-{
- $Devel::StackTrace::VERSION = '1.30';
+$Devel::StackTrace::VERSION = '1.31';
+BEGIN {
+ $Devel::StackTrace::AUTHORITY = 'cpan:DROLSKY';
}
use 5.006;
@@ -267,45 +268,45 @@
=head1 VERSION
-version 1.30
+version 1.31
=head1 SYNOPSIS
use Devel::StackTrace;
- my $trace = Devel::StackTrace->new;
+ my $trace = Devel::StackTrace->new();
- print $trace->as_string; # like carp
+ print $trace->as_string(); # like carp
# from top (most recent) of stack to bottom.
- while (my $frame = $trace->next_frame) {
- print "Has args\n" if $frame->hasargs;
+ while ( my $frame = $trace->next_frame() ) {
+ print "Has args\n" if $frame->hasargs();
}
# from bottom (least recent) of stack to top.
- while (my $frame = $trace->prev_frame) {
- print "Sub: ", $frame->subroutine, "\n";
+ while ( my $frame = $trace->prev_frame() ) {
+ print "Sub: ", $frame->subroutine(), "\n";
}
=head1 DESCRIPTION
-The Devel::StackTrace module contains two classes, Devel::StackTrace
-and Devel::StackTrace::Frame. The goal of this object is to encapsulate
-the information that can found through using the caller() function, as
-well as providing a simple interface to this data.
-
-The Devel::StackTrace object contains a set of Devel::StackTrace::Frame
-objects, one for each level of the stack. The frames contain all the
-data available from C<caller()>.
+The C<Devel::StackTrace> module contains two classes, C,Devel::StackTrace> and
+L<Devel::StackTrace::Frame>. These objects encapsulate the information that
+can retrieved via Perl's C<caller()> function, as well as providing a simple
+interface to this data.
+
+The C<Devel::StackTrace> object contains a set of C<Devel::StackTrace::Frame>
+objects, one for each level of the stack. The frames contain all the data
+available from C<caller()>.
-This code was created to support my L<Exception::Class::Base> class
-(part of Exception::Class) but may be useful in other contexts.
+This code was created to support my L<Exception::Class::Base> class (part of
+L<Exception::Class>) but may be useful in other contexts.
=head1 'TOP' AND 'BOTTOM' OF THE STACK
-When describing the methods of the trace object, I use the words 'top'
-and 'bottom'. In this context, the 'top' frame on the stack is the
-most recent frame and the 'bottom' is the least recent.
+When describing the methods of the trace object, I use the words 'top' and
+'bottom'. In this context, the 'top' frame on the stack is the most recent
+frame and the 'bottom' is the least recent.
Here's an example:
@@ -316,25 +317,25 @@
}
sub bar {
- Devel::StackTrace->new; # top frame is here.
+ Devel::StackTrace->new(); # top frame is here.
}
-=head1 Devel::StackTrace METHODS
+=head1 METHODS
-=over 4
+This class provide the following methods:
-=item * Devel::StackTrace->new(%named_params)
+=head2 Devel::StackTrace->new(%named_params)
Returns a new Devel::StackTrace object.
Takes the following parameters:
-=over 8
+=over 4
=item * frame_filter => $sub
By default, Devel::StackTrace will include all stack frames before the
-call to its its constructor.
+call to its constructor.
However, you may want to filter out some frames with more granularity
than 'ignore_package' or 'ignore_class' allow.
@@ -360,13 +361,13 @@
Devel::StackTrace internally adds itself to the 'ignore_package'
parameter, meaning that the Devel::StackTrace package is B<ALWAYS>
-ignored. However, if you create a subclass of Devel::StackTrace it
+ignored. However, if you create a subclass of Devel::StackTrace it
will not be ignored.
=item * no_refs => $boolean
If this parameter is true, then Devel::StackTrace will not store
-references internally when generating stacktrace frames. This lets
+references internally when generating stacktrace frames. This lets
your objects go out of scope.
Devel::StackTrace replaces any references with their stringified
@@ -381,7 +382,7 @@
By default, Devel::StackTrace will call C<overload::AddrRef()> to get
the underlying string representation of an object, instead of
-respecting the object's stringification overloading. If you would
+respecting the object's stringification overloading. If you would
prefer to see the overloaded representation of objects in stack
traces, then set this parameter to true.
@@ -405,62 +406,60 @@
=back
-=item * $trace->next_frame
+=head2 $trace->next_frame()
-Returns the next Devel::StackTrace::Frame object down on the stack. If
-it hasn't been called before it returns the first frame. It returns
-undef when it reaches the bottom of the stack and then resets its
-pointer so the next call to C<next_frame> or C<prev_frame> will work
-properly.
-
-=item * $trace->prev_frame
-
-Returns the next Devel::StackTrace::Frame object up on the stack. If it
-hasn't been called before it returns the last frame. It returns undef
-when it reaches the top of the stack and then resets its pointer so
-pointer so the next call to C<next_frame> or C<prev_frame> will work
-properly.
+Returns the next L<Devel::StackTrace::Frame> object on the stack, going
+down. If this method hasn't been called before it returns the first frame. It
+returns C<undef> when it reaches the bottom of the stack and then resets its
+pointer so the next call to C<< $trace->next_frame() >> or C<<
+$trace->prev_frame() >> will work properly.
+
+=head2 $trace->prev_frame()
+
+Returns the next L<Devel::StackTrace::Frame> object on the stack, going up. If
+this method hasn't been called before it returns the last frame. It returns
+undef when it reaches the top of the stack and then resets its pointer so the
+next call to C<< $trace->next_frame() >> or C<< $trace->prev_frame() >> will
+work properly.
-=item * $trace->reset_pointer
+=head2 $trace->reset_pointer
-Resets the pointer so that the next call C<next_frame> or
-C<prev_frame> will start at the top or bottom of the stack, as
+Resets the pointer so that the next call to C<< $trace->next_frame() >> or C<<
+$trace->prev_frame() >> will start at the top or bottom of the stack, as
appropriate.
-=item * $trace->frames
+=head2 $trace->frames()
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.
+of L<Devel::StackTrace::Frame> 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>:
+complex than can be handled by the C<< $trace->filter_frames() >> method:
$stacktrace->frames( my_filter( $stacktrace->frames() ) );
-=item * $trace->frame ($index)
+=head2 $trace->frame($index)
-Given an index, returns the relevant frame or undef if there is not
-frame at that index. The index is exactly like a Perl array. The
-first frame is 0 and negative indexes are allowed.
+Given an index, this method returns the relevant frame, or undef if there is
+no frame at that index. The index is exactly like a Perl array. The first
+frame is 0 and negative indexes are allowed.
-=item * $trace->frame_count
+=head2 $trace->frame_count()
Returns the number of frames in the trace object.
-=item * $trace->as_string(\%p)
+=head2 $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.
+Calls C<< $frame->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
+The optional C<\%p> parameter only has one option. The C<max_arg_length>
+parameter truncates each subroutine argument's string representation if it is
+longer than this number of characters.
=head1 SUPPORT
@@ -474,7 +473,7 @@
=head1 COPYRIGHT AND LICENSE
-This software is Copyright (c) 2012 by Dave Rolsky.
+This software is Copyright (c) 2014 by Dave Rolsky.
This is free software, licensed under:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/t/00-compile.t
new/Devel-StackTrace-1.31/t/00-compile.t
--- old/Devel-StackTrace-1.30/t/00-compile.t 1970-01-01 01:00:00.000000000
+0100
+++ new/Devel-StackTrace-1.31/t/00-compile.t 2014-01-16 23:35:53.000000000
+0100
@@ -0,0 +1,74 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+
+
+use File::Find;
+use File::Temp qw{ tempdir };
+
+my @modules;
+find(
+ sub {
+ return if $File::Find::name !~ /\.pm\z/;
+ my $found = $File::Find::name;
+ $found =~ s{^lib/}{};
+ $found =~ s{[/\\]}{::}g;
+ $found =~ s/\.pm$//;
+ # nothing to skip
+ push @modules, $found;
+ },
+ 'lib',
+);
+
+sub _find_scripts {
+ my $dir = shift @_;
+
+ my @found_scripts = ();
+ find(
+ sub {
+ return unless -f;
+ my $found = $File::Find::name;
+ # nothing to skip
+ open my $FH, '<', $_ or do {
+ note( "Unable to open $found in ( $! ), skipping" );
+ return;
+ };
+ my $shebang = <$FH>;
+ return unless $shebang =~ /^#!.*?\bperl\b\s*$/;
+ push @found_scripts, $found;
+ },
+ $dir,
+ );
+
+ return @found_scripts;
+}
+
+my @scripts;
+do { push @scripts, _find_scripts($_) if -d $_ }
+ for qw{ bin script scripts };
+
+my $plan = scalar(@modules) + scalar(@scripts);
+$plan ? (plan tests => $plan) : (plan skip_all => "no tests to run");
+
+{
+ # fake home for cpan-testers
+ # no fake requested ## local $ENV{HOME} = tempdir( CLEANUP => 1 );
+
+ like( qx{ $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_
loaded ok" )
+ for sort @modules;
+
+ SKIP: {
+ eval "use Test::Script 1.05; 1;";
+ skip "Test::Script needed to test script compilation",
scalar(@scripts) if $@;
+ foreach my $file ( @scripts ) {
+ my $script = $file;
+ $script =~ s!.*/!!;
+ script_compiles( $file, "$script script compiles" );
+ }
+ }
+
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/t/01-basic.t
new/Devel-StackTrace-1.31/t/01-basic.t
--- old/Devel-StackTrace-1.30/t/01-basic.t 2012-11-20 06:06:36.000000000
+0100
+++ new/Devel-StackTrace-1.31/t/01-basic.t 2014-01-16 23:35:53.000000000
+0100
@@ -241,8 +241,8 @@
{
{
-
- package FooBarBaz;
+ package #hide
+ FooBarBaz;
sub func2 {
return Devel::StackTrace->new( ignore_package => qr/^FooBar/ );
@@ -258,10 +258,10 @@
}
{
+ package #hide
+ StringOverloaded;
- package StringOverloaded;
-
- use overload '""' => sub {'overloaded'};
+ use overload '""' => sub { 'overloaded' };
}
{
@@ -287,8 +287,8 @@
}
{
-
- package BlowOnCan;
+ package #hide
+ BlowOnCan;
sub can { die 'foo' }
}
@@ -433,117 +433,144 @@
return Devel::StackTrace->new( no_refs => 1, respect_overload => 1 );
}
-package Test;
+{
+ package #hide
+ Test;
-sub foo {
- trace(@_);
-}
+ sub foo {
+ trace(@_);
+ }
-sub trace {
- Devel::StackTrace->new(@_);
+ sub trace {
+ Devel::StackTrace->new(@_);
+ }
}
-package SubTest;
+{
+ package #hide
+ SubTest;
-use base qw(Test);
+ use base qw(Test);
-sub foo {
- trace(@_);
-}
+ sub foo {
+ trace(@_);
+ }
-sub trace {
- Devel::StackTrace->new(@_);
+ sub trace {
+ Devel::StackTrace->new(@_);
+ }
}
-package RefTest;
+{
+ package #hide
+ RefTest;
-sub new {
- my $self = bless {}, shift;
+ sub new {
+ my $self = bless {}, shift;
- $self->{trace} = trace($self);
+ $self->{trace} = trace($self);
- return $self;
-}
+ return $self;
+ }
-sub trace {
- Devel::StackTrace->new();
+ sub trace {
+ Devel::StackTrace->new();
+ }
}
-package RefTest2;
+{
+ package #hide
+ RefTest2;
-sub new {
- my $self = bless {}, shift;
+ sub new {
+ my $self = bless {}, shift;
- $self->{trace} = trace($self);
+ $self->{trace} = trace($self);
- return $self;
-}
+ return $self;
+ }
-sub trace {
- Devel::StackTrace->new( no_refs => 1 );
+ sub trace {
+ Devel::StackTrace->new( no_refs => 1 );
+ }
}
-package RefTest3;
+{
+ package #hide
+ RefTest3;
-sub new {
- my $self = bless {}, shift;
+ sub new {
+ my $self = bless {}, shift;
- $self->{trace} = trace($self);
+ $self->{trace} = trace($self);
- return $self;
-}
+ return $self;
+ }
-sub trace {
- Devel::StackTrace->new( no_object_refs => 1 );
+ sub trace {
+ Devel::StackTrace->new( no_object_refs => 1 );
+ }
}
-package RefTest4;
+{
+ package #hide
+ RefTest4;
-sub new {
- my $self = bless {}, shift;
+ sub new {
+ my $self = bless {}, shift;
- $self->{trace} = trace( $self, 'not a ref' );
+ $self->{trace} = trace( $self, 'not a ref' );
- return $self;
-}
+ return $self;
+ }
-sub trace {
- Devel::StackTrace->new( no_refs => 1 );
+ sub trace {
+ Devel::StackTrace->new( no_refs => 1 );
+ }
}
-package CodeOverload;
+{
+ package #hide
+ CodeOverload;
-use overload '&{}' => sub {'foo'};
+ use overload '&{}' => sub { 'foo' };
-sub new {
- my $class = shift;
- return bless {}, $class;
+ sub new {
+ my $class = shift;
+ return bless {}, $class;
+ }
}
-package Filter;
+{
+ package #hide
+ Filter;
-sub foo {
- bar();
-}
+ sub foo {
+ bar();
+ }
-sub bar {
- return Devel::StackTrace->new(
- frame_filter => sub { $_[0]{caller}[3] ne 'Filter::foo' } );
+ sub bar {
+ 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() }
+{
+ package #hide
+ FilterAllFrames;
-sub b_bar {
- my $stacktrace = Devel::StackTrace->new();
- $stacktrace->frames( only_a_frames( $stacktrace->frames() ) );
- return $stacktrace;
-}
+ 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;
+ 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.30/t/author-pod-spell.t
new/Devel-StackTrace-1.31/t/author-pod-spell.t
--- old/Devel-StackTrace-1.30/t/author-pod-spell.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Devel-StackTrace-1.31/t/author-pod-spell.t 2014-01-16
23:35:53.000000000 +0100
@@ -0,0 +1,31 @@
+
+BEGIN {
+ unless ($ENV{AUTHOR_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for testing by the author');
+ }
+}
+
+use strict;
+use warnings;
+use Test::More;
+
+# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.004003
+eval "use Test::Spelling 0.12; use Pod::Wordlist::hanekomu; 1" or die $@;
+
+
+add_stopwords(<DATA>);
+all_pod_files_spelling_ok( qw( bin lib ) );
+__DATA__
+CPAN
+Rolsky
+stacktrace
+DROLSKY
+DROLSKY's
+Rolsky's
+Dave
+autarch
+lib
+Devel
+StackTrace
+Frame
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/t/release-pod-coverage.t
new/Devel-StackTrace-1.31/t/release-pod-coverage.t
--- old/Devel-StackTrace-1.30/t/release-pod-coverage.t 2012-11-20
06:06:36.000000000 +0100
+++ new/Devel-StackTrace-1.31/t/release-pod-coverage.t 2014-01-16
23:35:53.000000000 +0100
@@ -1,3 +1,4 @@
+#!perl
BEGIN {
unless ($ENV{RELEASE_TESTING}) {
@@ -6,28 +7,16 @@
}
}
-use strict;
-use warnings;
+# This file was automatically generated by
Dist::Zilla::Plugin::PodCoverageTests.
use Test::More;
-use Test::Pod::Coverage 1.04;
-my @modules = all_modules();
-plan tests => scalar @modules;
+eval "use Test::Pod::Coverage 1.08";
+plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage"
+ if $@;
+
+eval "use Pod::Coverage::TrustPod";
+plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage"
+ if $@;
-my %trustme = (
- 'Devel::StackTrace::Frame' => [qw( new as_string )],
-);
-
-for my $module ( sort @modules ) {
- my $trustme = [];
- if ( $trustme{$module} ) {
- my $methods = join '|', @{ $trustme{$module} };
- $trustme = [qr/^(?:$methods)$/];
- }
-
- pod_coverage_ok(
- $module, { trustme => $trustme },
- "Pod coverage for $module"
- );
-}
+all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/t/release-pod-spell.t
new/Devel-StackTrace-1.31/t/release-pod-spell.t
--- old/Devel-StackTrace-1.30/t/release-pod-spell.t 2012-11-20
06:06:36.000000000 +0100
+++ new/Devel-StackTrace-1.31/t/release-pod-spell.t 1970-01-01
01:00:00.000000000 +0100
@@ -1,32 +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::Spelling;
-
-my @stopwords;
-for (<DATA>) {
- chomp;
- push @stopwords, $_
- unless /\A (?: \# | \s* \z)/msx; # skip comments, whitespace
-}
-
-add_stopwords(@stopwords);
-set_spell_cmd('aspell list -l en');
-
-# This prevents a weird segfault from the aspell command - see
-# https://bugs.launchpad.net/ubuntu/+source/aspell/+bug/71322
-local $ENV{LC_ALL} = 'C';
-all_pod_files_spelling_ok;
-
-__DATA__
-CPAN
-Rolsky
-stacktrace
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/t/release-pod-syntax.t
new/Devel-StackTrace-1.31/t/release-pod-syntax.t
--- old/Devel-StackTrace-1.30/t/release-pod-syntax.t 2012-11-20
06:06:36.000000000 +0100
+++ new/Devel-StackTrace-1.31/t/release-pod-syntax.t 2014-01-16
23:35:53.000000000 +0100
@@ -7,6 +7,7 @@
}
}
+# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
use Test::More;
eval "use Test::Pod 1.41";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-StackTrace-1.30/t/release-synopsis.t
new/Devel-StackTrace-1.31/t/release-synopsis.t
--- old/Devel-StackTrace-1.30/t/release-synopsis.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Devel-StackTrace-1.31/t/release-synopsis.t 2014-01-16
23:35:53.000000000 +0100
@@ -0,0 +1,16 @@
+#!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::Synopsis";
+plan skip_all => "Test::Synopsis required for testing synopses"
+ if $@;
+all_synopsis_ok();
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]