[meego-commits] 6796: Changes to Trunk/perl-Devel-StackTrace
Peter Zhu
peter.j.zhu at intel.com
Wed Aug 18 08:54:28 UTC 2010
Hi,
I have made the following changes to perl-Devel-StackTrace in project Trunk. Please review and accept ASAP.
Thank You,
Peter Zhu
[This message was auto-generated]
---
Request #6796:
submit: Trunk:Testing/perl-Devel-StackTrace(r4) -> Trunk/perl-Devel-StackTrace
Message:
Move to Trunk
State: new 2010-08-17T20:45:05 peter
Comment: None
changes files:
--------------
--- perl-Devel-StackTrace.changes
+++ perl-Devel-StackTrace.changes
@@ -0,0 +1,3 @@
+* Wed Jul 28 2010 Quanxian Wang <quanxian.wang at intel.com> - 1.22
+- update to 1.22
+
old:
----
Devel-StackTrace-1.1902.tar.gz
new:
----
Devel-StackTrace-1.2200.tar.gz
perl-Devel-StackTrace.yaml
spec files:
-----------
--- perl-Devel-StackTrace.spec
+++ perl-Devel-StackTrace.spec
@@ -1,24 +1,26 @@
+#
+# Do not Edit! Generated by:
+# spectacle version 0.18
+#
+# >> macros
+# << macros
+
Name: perl-Devel-StackTrace
Summary: Perl module implementing stack trace and stack trace frame objects
-Version: 1.1902
-Release: 1
-License: GPL+ or Artistic
+Version: 1.2200
+Release: 10
Group: Development/Libraries
+License: GPL+ or Artistic
+BuildArch: noarch
URL: http://search.cpan.org/dist/Devel-StackTrace
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Source: http://search.cpan.org//CPAN/authors/id/D/DR/DROLSKY/Devel-StackTrace-%{version}.tar.gz
-
-Buildarch: noarch
-
+Source0: http://search.cpan.org//CPAN/authors/id/D/DR/DROLSKY/Devel-StackTrace-%{version}.tar.gz
+Source100: perl-Devel-StackTrace.yaml
+Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Scalar::Util)
-
-# for improved tests
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage) >= 1.04
-# Missing in Fedora
-# BuildRequires: perl(Test::Kwalitee)
-Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+
%description
The Devel::StackTrace module contains two classes, Devel::StackTrace
@@ -30,29 +32,63 @@
objects, one for each level of the stack. The frames contain all the
data available from caller() as of Perl 5.6.0.
+
+
+
%prep
%setup -q -n Devel-StackTrace-%{version}
+# >> setup
+# << setup
+
%build
-perl Makefile.PL INSTALLDIRS=vendor
-make %{?_smp_mflags}
+# >> build pre
+# << build pre
+
+if test -f Makefile.PL; then
+%{__perl} Makefile.PL INSTALLDIRS=vendor
+make %{?jobs:-j%jobs}
+else
+%{__perl} Build.PL --installdirs vendor
+./Build
+fi
+# >> build post
+# << build post
%install
-rm -rf $RPM_BUILD_ROOT
-make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
-find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
-find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
-chmod -R u+w $RPM_BUILD_ROOT/*
+rm -rf %{buildroot}
+# >> install pre
+# << install pre
+if test -f Makefile.PL; then
+make pure_install PERL_INSTALL_ROOT=%{buildroot}
+else
+./Build install --installdirs vendor
+fi
+find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
+find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
+find %{buildroot} -type f -name '*.bs' -empty -exec rm -f {} ';'
+%{_fixperms} %{buildroot}/*
-%clean
-rm -rf $RPM_BUILD_ROOT
+# >> install post
+chmod -R u+w $RPM_BUILD_ROOT/*
+# << install post
%check
+# >> check
make test IS_MAINTAINER=1
+# << check
+
+
+
+
+
%files
%defattr(-,root,root,-)
+# >> files
%doc README LICENSE Changes
%{perl_vendorlib}/Devel
%doc %{_mandir}/man3/*
+# << files
+
other changes:
--------------
++++++ Devel-StackTrace-1.1902.tar.gz -> Devel-StackTrace-1.2200.tar.gz
--- Build.PL
+++ Build.PL
@@ -8,9 +8,10 @@
my $build =
Module::Build->new( module_name => 'Devel::StackTrace',
license => 'perl',
- requires => { 'Test::More' => '0.46',
- 'File::Spec' => 0,
- 'perl' => 5.006,
+ requires => { 'File::Spec' => '0',
+ 'Scalar::Util' => '0',
+ 'Test::More' => '0.46',
+ 'perl' => '5.006',
},
sign => 1,
create_makefile_pl => 'traditional',
--- Changes
+++ Changes
@@ -1,3 +1,32 @@
+1.22 Jul 15, 2009
+
+- Apparently, overload::StrVal on older Perls (5.8.5, but not 5.8.8)
+ tried to call a stringification method if it existed. So now,
+ Devel::StackTrace just uses overload::AddrRef instead, which should
+ always be safe. Reported by Michael Stevens. Fixes RT #47900.
+
+
+1.21 Jul 1, 2009
+
+- Overloaded objects which didn't provide a stringification method
+ cause Devel::StackTrace to die when respect_overload was
+ true. Reported by Laurent Dami. RT #39533.
+
+- Added a frame_filter option which allows for fine-grained control
+ over what frames are included in a trace. Based on (but expanded)
+ from a patch proposed by Florian Ragwitz. RT #47415.
+
+
+1.20 Oct 25, 2008
+
+- The change in 1.15 to object creation broke the no_refs feature,
+ causing references to be stored until the trace's frame objects were
+ created.
+
+* Exception::Class objects are always stringified by calling
+ overload::StrVal().
+
+
1.1902 Jul 16, 2008
- This release just contains another test fix.
--- META.yml
+++ META.yml
@@ -1,6 +1,6 @@
---
name: Devel-StackTrace
-version: 1.1902
+version: 1.22
author:
- 'Dave Rolsky, <autarch at urth.org>'
abstract: Stack trace and stack trace frame objects
@@ -9,13 +9,14 @@
license: http://dev.perl.org/licenses/
requires:
File::Spec: 0
+ Scalar::Util: 0
Test::More: 0.46
perl: 5.006
provides:
Devel::StackTrace:
file: lib/Devel/StackTrace.pm
- version: 1.1902
-generated_by: Module::Build version 0.2808
+ version: 1.22
+generated_by: Module::Build version 0.280801
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.2.html
version: 1.2
--- Makefile.PL
+++ Makefile.PL
@@ -1,4 +1,5 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.03
+# Note: this file was auto-generated by Module::Build::Compat version 0.2808_01
+require 5.006;
use ExtUtils::MakeMaker;
WriteMakefile
(
@@ -6,6 +7,7 @@
'VERSION_FROM' => 'lib/Devel/StackTrace.pm',
'PREREQ_PM' => {
'File::Spec' => '0',
+ 'Scalar::Util' => '0',
'Test::More' => '0.46'
},
'INSTALLDIRS' => 'site',
--- README
+++ README
@@ -28,7 +28,7 @@
The Devel::StackTrace object contains a set of Devel::StackTraceFrame
objects, one for each level of the stack. The frames contain all the
- data available from "caller()".
+ 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.
@@ -53,19 +53,33 @@
}
Devel::StackTrace METHODS
- * Devel::StackTrace->new(%named_params)
-
+ * Devel::StackTrace->new(%named_params)
Returns a new Devel::StackTrace object.
Takes the following parameters:
- * ignore_package => $package_name OR \@package_names
+ * frame_filter => $sub
+ By default, Devel::StackTrace will include all stack frames
+ before the call to its 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
-
+ * 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.
@@ -75,8 +89,7 @@
create a subclass of Devel::StackTrace it will not be
ignored.
- * no_refs => $boolean
-
+ * 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.
@@ -84,61 +97,52 @@
Devel::StackTrace replaces any references with their
stringified representation.
- * respect_overload => $boolean
-
- By default, Devel::StackTrace will call "overload::StrVal()"
- 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
+ * 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 it to truncate the argument's string representation
if it is longer than this number of characters.
- * $trace->next_frame
-
+ * $trace->next_frame
Returns the next Devel::StackTraceFrame 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 "next_frame" or "prev_frame" will work
+ pointer so the next call to `next_frame' or `prev_frame' will work
properly.
- * $trace->prev_frame
-
+ * $trace->prev_frame
Returns the next Devel::StackTraceFrame 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 "next_frame" or "prev_frame"
+ pointer so pointer so the next call to `next_frame' or `prev_frame'
will work properly.
- * $trace->reset_pointer
-
- Resets the pointer so that the next call "next_frame" or
- "prev_frame" will start at the top or bottom of the stack, as
+ * $trace->reset_pointer
+ Resets the pointer so that the next call `next_frame' or
+ `prev_frame' will start at the top or bottom of the stack, as
appropriate.
- * $trace->frames
-
+ * $trace->frames
Returns a list of Devel::StackTraceFrame objects. The order they are
returned is from top (most recent) to bottom.
- * $trace->frame ($index)
-
+ * $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.
- * $trace->frame_count
-
+ * $trace->frame_count
Returns the number of frames in the trace object.
- * $trace->as_string
-
+ * $trace->as_string
Calls as_string on each frame from top to bottom, producing output
quite similar to the Carp module's cluck/confess methods.
@@ -146,34 +150,24 @@
See the caller documentation for more information on what these methods
return.
- * $frame->package
-
- * $frame->filename
-
- * $frame->line
-
- * $frame->subroutine
-
- * $frame->hasargs
-
- * $frame->wantarray
-
- * $frame->evaltext
-
+ * $frame->package
+ * $frame->filename
+ * $frame->line
+ * $frame->subroutine
+ * $frame->hasargs
+ * $frame->wantarray
+ * $frame->evaltext
Returns undef if the frame was not part of an eval.
- * $frame->is_require
-
+ * $frame->is_require
Returns undef if the frame was not part of a require.
- * $frame->args
-
+ * $frame->args
Returns the arguments passed to the frame. Note that any arguments
that are references are returned as references, not copies.
- * $frame->hints
-
- * $frame->bitmask
+ * $frame->hints
+ * $frame->bitmask
SUPPORT
Please submit bugs to the CPAN RT system at
--- SIGNATURE
+++ SIGNATURE
@@ -15,23 +15,23 @@
Hash: SHA1
SHA1 7afddfc9acf24c266120ef5c2f7bd386d2d3901d .shipit
-SHA1 3d845cfeefa52ba71f90d8e43e7f17214c0365b8 Build.PL
-SHA1 c445e1b99f98b880aa20fdc891d59128925d77d7 Changes
+SHA1 e35fb27b937280dc6e1b2f441a59e47b68faa1d1 Build.PL
+SHA1 166dde560dfac683c03b92f1721d66aa2835f759 Changes
SHA1 f235ba4160673bcb7c9d58c2f09dbc7fc0efadea LICENSE
SHA1 9ed43409974a8b931e0e34af209d4f99ccc68d50 MANIFEST
-SHA1 569af5aa90ed3899d145f00abcca1cc0cbf79c08 META.yml
-SHA1 c3d9c0c03faad299fd07bf46c48f7ad0edc204a1 Makefile.PL
-SHA1 2c9447514240fab2c68851da0e4f3dbbb2157767 README
-SHA1 263b4336563e7b017ac42f466c589f3e10e53c66 lib/Devel/StackTrace.pm
-SHA1 a2379209b184d257b818ea03c2952e836a64c8f2 t/01-basic.t
+SHA1 21f21aeac63758b65b1b4368159fad8c745ba733 META.yml
+SHA1 4b62edd5403cd0d20d55e30c37f9ab66b7c16255 Makefile.PL
+SHA1 e2d1e672cbe0736f2ba875a710470db4966008bb README
+SHA1 6153512764fc37df958567ca10ab43962b1667b6 lib/Devel/StackTrace.pm
+SHA1 541a8627e32d01a0a395fd70a0cfad4f5163064f t/01-basic.t
SHA1 21a1538da8dbde54af7a1708fa2470dd74fe67fc t/02-bad-utf8.t
SHA1 9ade2293d6e5ea77d94532132c89cd205ea85ed7 t/kwalitee.t
SHA1 28a931f3b0c075d8d6c4ce47d5e89c3fdb19ed0f t/pod-coverage.t
SHA1 cec881e89926d320475f9de2b7fad02c2169f510 t/pod.t
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.6 (GNU/Linux)
+Version: GnuPG v1.4.9 (GNU/Linux)
-iD8DBQFIffVr3Or3ZzQuifMRAlZ7AKCGL9lujqJNySvc6x0Et9O5JQkR9QCfaO25
-pbLrUnV6b0xqqR+xW4r1TTo=
-=1UDd
+iEYEARECAAYFAkpeMyQACgkQIgMCsV8qvRLunwCfcYaGRVtuZc28Wmc0dd20ZxWc
+xeMAoI2le7W01yd2CndGOkMfHM/+KDNf
+=MI7n
-----END PGP SIGNATURE-----
--- lib/Devel/StackTrace.pm
+++ lib/Devel/StackTrace.pm
@@ -6,12 +6,13 @@
use warnings;
use File::Spec;
+use Scalar::Util qw( blessed );
use overload
'""' => \&as_string,
fallback => 1;
-our $VERSION = '1.1902';
+our $VERSION = '1.22';
sub new
@@ -46,6 +47,12 @@
do { package DB; @DB::args = (); caller($x++) } )
{
my @a = @DB::args;
+
+ if ( $self->{no_refs} )
+ {
+ @a = map { ref $_ ? $self->_ref_to_string($_) : $_ } @a;
+ }
+
push @{ $self->{raw} },
{ caller => \@c,
args => \@a,
@@ -53,10 +60,44 @@
}
}
+sub _ref_to_string
+{
+ my $self = shift;
+ my $ref = shift;
+
+ return overload::AddrRef($ref)
+ if blessed $ref && $ref->isa('Exception::Class::Base');
+
+ return overload::AddrRef($ref) unless $self->{respect_overload};
+
+ local $@;
+ local $SIG{__DIE__};
+
+ my $str = eval { $ref . '' };
+
+ return $@ ? overload::AddrRef($ref) : $str;
+}
+
sub _make_frames
{
my $self = shift;
+ my $filter = $self->_make_frame_filter;
+
+ my $raw = delete $self->{raw};
+ for my $r ( @{$raw} )
+ {
+ next unless $filter->($r);
+
+ $self->_add_frame( $r->{caller}, $r->{args} );
+ }
+}
+
+my $default_filter = sub { 1 };
+sub _make_frame_filter
+{
+ my $self = shift;
+
my (@i_pack_re, %i_class);
if ( $self->{ignore_package} )
{
@@ -66,23 +107,29 @@
@i_pack_re = map { ref $_ ? $_ : qr/^\Q$_\E$/ } @{ $self->{ignore_package} };
}
+ my $p = __PACKAGE__;
+ push @i_pack_re, qr/^\Q$p\E$/;
+
if ( $self->{ignore_class} )
{
$self->{ignore_class} = [ $self->{ignore_class} ] unless ref $self->{ignore_class};
%i_class = map {$_ => 1} @{ $self->{ignore_class} };
}
- my $p = __PACKAGE__;
- push @i_pack_re, qr/^\Q$p\E$/;
+ my $user_filter = $self->{frame_filter};
- my $raw = delete $self->{raw};
- for my $r ( @{$raw} )
+ return sub
{
- next if grep { $r->{caller}[0] =~ /$_/ } @i_pack_re;
- next if grep { $r->{caller}[0]->isa($_) } keys %i_class;
+ return 0 if grep { $_[0]{caller}[0] =~ /$_/ } @i_pack_re;
+ return 0 if grep { $_[0]{caller}[0]->isa($_) } keys %i_class;
- $self->_add_frame( $r->{caller}, $r->{args} );
- }
+ if ( $user_filter )
+ {
+ return $user_filter->( $_[0] );
+ }
+
+ return 1;
+ };
}
sub _add_frame
@@ -96,34 +143,6 @@
if ( $self->{no_refs} )
{
- for ( grep { ref } @{$args} )
- {
- # I can't remember what this is about but I think
- # it must be to avoid a loop between between
- # Exception::Class and this module.
- if ( UNIVERSAL::isa( $_, 'Exception::Class::Base' ) )
- {
- $_ = do { if ( $_->can('show_trace') )
- {
- my $t = $_->show_trace;
- $_->show_trace(0);
- my $s = "$_";
- $_->show_trace($t);
- $s;
- }
- else
- {
- # hack but should work with older
- # versions of E::C::B
- $_->{message};
- }
- };
- }
- else
- {
- $_ = $self->_ref_as_string($_);
- }
- }
}
push @{ $self->{frames} },
@@ -131,15 +150,6 @@
$self->{respect_overload}, $self->{max_arg_length} );
}
-sub _ref_as_string
-{
- my $self = shift;
-
- return overload::StrVal($_[0]) unless $self->{respect_overload};
- # force stringification
- return $_[0] . '';
-}
-
sub next_frame
{
my $self = shift;
@@ -329,7 +339,7 @@
$_ = "undef", next unless defined $_;
# hack!
- $_ = $self->Devel::StackTrace::_ref_as_string($_)
+ $_ = $self->Devel::StackTrace::_ref_to_string($_)
if ref $_;
eval
@@ -440,6 +450,23 @@
=over 8
+=item * frame_filter => $sub
+
+By default, Devel::StackTrace will include all stack frames before the
+call to its 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 C<caller()> function, and the "args"
+key are the subroutine arguments found in C<@DB::args>.
+
+The filter should return true if the frame should be included, or
+false if it should be skipped.
+
=item * ignore_package => $package_name OR \@package_names
Any frames where the package is one of these packages will not be on
@@ -466,7 +493,7 @@
=item * respect_overload => $boolean
-By default, Devel::StackTrace will call C<overload::StrVal()> to get
+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
prefer to see the overloaded representation of objects in stack
--- t/01-basic.t
+++ t/01-basic.t
@@ -1,17 +1,16 @@
use strict;
use warnings;
+use Devel::StackTrace;
use Test::More;
BEGIN
{
- my $tests = 35;
+ my $tests = 40;
eval { require Exception::Class };
$tests++ if ! $@ && $Exception::Class::VERSION >= 1.09;
plan tests => $tests;
-
- use_ok('Devel::StackTrace');
}
sub get_file_name { File::Spec->canonpath( (caller(0))[1] ) }
@@ -54,7 +53,7 @@
Trace begun at $test_file_name line 1012
main::baz(1, 2) called at $test_file_name line 1007
main::bar(1) called at $test_file_name line 1002
-main::foo at $test_file_name line 22
+main::foo at $test_file_name line 21
EOF
is( $trace->as_string, $trace_text, 'trace text' );
@@ -92,7 +91,7 @@
my $trace_text = <<"EOF";
Trace begun at $test_file_name line 1012
-main::baz at $test_file_name line 91
+main::baz at $test_file_name line 90
EOF
my $t = "$trace";
@@ -262,7 +261,7 @@
my $trace_text = <<"EOF";
Trace begun at $test_file_name line 1027
-main::max_arg_length('abcdefghij...') called at $test_file_name line 261
+main::max_arg_length('abcdefghij...') called at $test_file_name line 260
EOF
is( $trace->as_string, $trace_text, 'trace text' );
@@ -279,6 +278,36 @@
is( $frame->filename, 'foo/bar/baz.pm', 'filename is canonicalized' );
}
+{
+ my $obj = RefTest4->new();
+
+ my $trace = $obj->{trace};
+
+ ok( ( ! grep { ref $_ } map { @{ $_->{args} } } @{ $trace->{raw} } ),
+ 'raw data does not contain any references when no_refs is true' );
+
+ is( $trace->{raw}[1]{args}[1], 'not a ref',
+ 'non-refs are preserved properly in raw data as well' );
+}
+
+{
+ my $trace = overload_no_stringify( CodeOverload->new() );
+
+ eval { $trace->as_string() };
+
+ is( $@, q{},
+ 'no error when respect_overload is true and object overloads but does not stringify' );
+}
+
+{
+ my $trace = Filter::foo();
+
+ my @frames = $trace->frames();
+ is( scalar @frames, 2, 'filtered trace has just 2 frames' );
+ is( $frames[0]->subroutine(), 'Devel::StackTrace::new', 'first subroutine' );
+ is( $frames[1]->subroutine(), 'Filter::bar', 'second subroutine (skipped Filter::foo)' );
+}
+
# This means I can move these lines down without constantly fiddling
# with the checks for line numbers in the tests.
@@ -313,6 +342,12 @@
Devel::StackTrace->new( max_arg_length => 10 );
}
+sub overload_no_stringify
+{
+ return Devel::StackTrace->new( no_refs => 1, respect_overload => 1 );
+}
+
+
package Test;
sub foo
@@ -386,3 +421,41 @@
{
Devel::StackTrace->new( no_object_refs => 1 );
}
+
+package RefTest4;
+
+sub new
+{
+ my $self = bless {}, shift;
+
+ $self->{trace} = trace( $self, 'not a ref' );
+
+ return $self;
+}
+
+sub trace
+{
+ Devel::StackTrace->new( no_refs => 1 );
+}
+
+package CodeOverload;
+
+use overload '&{}' => sub { 'foo' };
+
+sub new
+{
+ my $class = shift;
+ return bless {}, $class;
+}
+
+package Filter;
+
+sub foo
+{
+ bar();
+}
+
+sub bar
+{
+ return Devel::StackTrace->new( frame_filter => sub { $_[0]{caller}[3] ne 'Filter::foo' } );
+}
++++++ perl-Devel-StackTrace.yaml (new)
--- perl-Devel-StackTrace.yaml
+++ perl-Devel-StackTrace.yaml
+Name: perl-Devel-StackTrace
+Summary: Perl module implementing stack trace and stack trace frame objects
+Version: 1.2200
+Release: 10
+Group: Development/Libraries
+License: GPL+ or Artistic
+URL: http://search.cpan.org/dist/Devel-StackTrace
+Sources:
+ - http://search.cpan.org//CPAN/authors/id/D/DR/DROLSKY/Devel-StackTrace-%{version}.tar.gz
+Description: |
+ The Devel::StackTrace module contains two classes, Devel::StackTrace
+ and Devel::StackTraceFrame. 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::StackTraceFrame
+ objects, one for each level of the stack. The frames contain all the
+ data available from caller() as of Perl 5.6.0.
+
+PkgBR:
+ - perl(ExtUtils::MakeMaker)
+ - perl(Scalar::Util)
+ - perl(Test::Pod)
+ - perl(Test::Pod::Coverage) >= 1.04
+Configure: none
+Builder: perl
+Check: yes
+BuildArch: noarch
More information about the MeeGo-commits
mailing list