r21047 - in /trunk/libdevel-stacktrace-perl: Build.PL Changes MANIFEST META.yml README SIGNATURE debian/changelog lib/Devel/StackTrace.pm t/01-basic.t t/02-bad-utf8.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sat Jun 14 19:12:05 UTC 2008


Author: gregoa
Date: Sat Jun 14 19:12:04 2008
New Revision: 21047

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=21047
Log:
New upstream release.

Added:
    trunk/libdevel-stacktrace-perl/t/02-bad-utf8.t
      - copied unchanged from r21046, branches/upstream/libdevel-stacktrace-perl/current/t/02-bad-utf8.t
Modified:
    trunk/libdevel-stacktrace-perl/Build.PL
    trunk/libdevel-stacktrace-perl/Changes
    trunk/libdevel-stacktrace-perl/MANIFEST
    trunk/libdevel-stacktrace-perl/META.yml
    trunk/libdevel-stacktrace-perl/README
    trunk/libdevel-stacktrace-perl/SIGNATURE
    trunk/libdevel-stacktrace-perl/debian/changelog
    trunk/libdevel-stacktrace-perl/lib/Devel/StackTrace.pm
    trunk/libdevel-stacktrace-perl/t/01-basic.t

Modified: trunk/libdevel-stacktrace-perl/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-stacktrace-perl/Build.PL?rev=21047&op=diff
==============================================================================
--- trunk/libdevel-stacktrace-perl/Build.PL (original)
+++ trunk/libdevel-stacktrace-perl/Build.PL Sat Jun 14 19:12:04 2008
@@ -1,4 +1,7 @@
+use 5.006;
+
 use strict;
+use warnings;
 
 use Module::Build;
 
@@ -7,6 +10,7 @@
                         license     => 'perl',
                         requires    => { 'Test::More' => '0.46',
                                          'File::Spec' => 0,
+                                         'perl'       => 5.006,
                                        },
                         sign        => 1,
                         create_makefile_pl => 'traditional',

Modified: trunk/libdevel-stacktrace-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-stacktrace-perl/Changes?rev=21047&op=diff
==============================================================================
--- trunk/libdevel-stacktrace-perl/Changes (original)
+++ trunk/libdevel-stacktrace-perl/Changes Sat Jun 14 19:12:04 2008
@@ -1,3 +1,23 @@
+1.1901  Jun 13, 2008
+
+- This release just contains a test fix.
+
+- The new tests for bad utf-8 fail with Perl 5.8.x where x <=
+  6. Apparently, utf-8 was just more broken back then. Reported by
+  Andreas Koenig's smokebots.
+
+
+1.19  Jun 13, 2008
+
+- Dropped support for Perl 5.005.
+
+- If a function was in stack trace had been called with invalid utf-8
+  bytes, this could cause stringifying a stack trace to blow up when
+  it tried to stringify that argument. We now catch those (and other)
+  errors and simply put "(bad utf-8)" or "?" in the stringified
+  argument list. Reported by Alex Vandiver.
+
+
 1.18  Mar 31, 2008
 
 - Fix a test failure on Win32. No changes to the non-test code.

Modified: trunk/libdevel-stacktrace-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-stacktrace-perl/MANIFEST?rev=21047&op=diff
==============================================================================
--- trunk/libdevel-stacktrace-perl/MANIFEST (original)
+++ trunk/libdevel-stacktrace-perl/MANIFEST Sat Jun 14 19:12:04 2008
@@ -6,9 +6,10 @@
 Makefile.PL
 MANIFEST			This list of files
 META.yml
+README
 t/01-basic.t
+t/02-bad-utf8.t
 t/kwalitee.t
 t/pod-coverage.t
 t/pod.t
-README
 SIGNATURE    Added here by Module::Build

Modified: trunk/libdevel-stacktrace-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-stacktrace-perl/META.yml?rev=21047&op=diff
==============================================================================
--- trunk/libdevel-stacktrace-perl/META.yml (original)
+++ trunk/libdevel-stacktrace-perl/META.yml Sat Jun 14 19:12:04 2008
@@ -1,6 +1,6 @@
 ---
 name: Devel-StackTrace
-version: 1.18
+version: 1.1901
 author:
   - 'Dave Rolsky, <autarch at urth.org>'
 abstract: Stack trace and stack trace frame objects
@@ -10,13 +10,11 @@
 requires:
   File::Spec: 0
   Test::More: 0.46
+  perl: 5.006
 provides:
   Devel::StackTrace:
     file: lib/Devel/StackTrace.pm
-    version: 1.18
-  Devel::StackTraceFrame:
-    file: lib/Devel/StackTrace.pm
-    version: 0.6
+    version: 1.1901
 generated_by: Module::Build version 0.2808
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.2.html

Modified: trunk/libdevel-stacktrace-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-stacktrace-perl/README?rev=21047&op=diff
==============================================================================
--- trunk/libdevel-stacktrace-perl/README (original)
+++ trunk/libdevel-stacktrace-perl/README Sat Jun 14 19:12:04 2008
@@ -28,8 +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() as of Perl 5.6.0 though this module still
-    works with 5.00503.
+    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.
@@ -54,16 +53,19 @@
       }
 
 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
+        *       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.
 
@@ -73,7 +75,8 @@
                 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.
@@ -81,7 +84,8 @@
                 Devel::StackTrace replaces any references with their
                 stringified representation.
 
-        * respect_overload => $boolean
+        *       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
@@ -89,44 +93,52 @@
                 representation of objects in stack traces, then set this
                 parameter to true.
 
-        * max_arg_length => $integer
+        *       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
         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"
         will work properly.
 
-    * $trace->reset_pointer
+    *   $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.
 
@@ -134,25 +146,34 @@
     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.
 
-  These only contain data as of Perl 5.6.0 or later
-    * $frame->hints
-    * $frame->bitmask
+    *   $frame->hints
+
+    *   $frame->bitmask
 
 SUPPORT
     Please submit bugs to the CPAN RT system at

Modified: trunk/libdevel-stacktrace-perl/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-stacktrace-perl/SIGNATURE?rev=21047&op=diff
==============================================================================
--- trunk/libdevel-stacktrace-perl/SIGNATURE (original)
+++ trunk/libdevel-stacktrace-perl/SIGNATURE Sat Jun 14 19:12:04 2008
@@ -15,22 +15,23 @@
 Hash: SHA1
 
 SHA1 7afddfc9acf24c266120ef5c2f7bd386d2d3901d .shipit
-SHA1 8e3350ff635f37c8cedd7e240503a037cab07062 Build.PL
-SHA1 8ced8db809ea60444425d17abdbf8d02664065ea Changes
+SHA1 3d845cfeefa52ba71f90d8e43e7f17214c0365b8 Build.PL
+SHA1 980bb994385caeebc1510e198fd51b06b62ef46d Changes
 SHA1 f235ba4160673bcb7c9d58c2f09dbc7fc0efadea LICENSE
-SHA1 88135f8cc6f9af4bf0831d9690113b3aa30b9e6a MANIFEST
-SHA1 d2ab6c939a2bf9522ac6fed3c71d8719d193d0bd META.yml
+SHA1 9ed43409974a8b931e0e34af209d4f99ccc68d50 MANIFEST
+SHA1 c70237ecc2c6d6dd7bbf4be705ee52d660c22634 META.yml
 SHA1 c3d9c0c03faad299fd07bf46c48f7ad0edc204a1 Makefile.PL
-SHA1 975b6f9254cf20c3d39eee12dff6173af2b4a710 README
-SHA1 d5666d9a18b138d5e4099591666ce6c3d3390b6b lib/Devel/StackTrace.pm
-SHA1 fb4e0336ea05d7d4eefe8534fe72f41b180f6bdc t/01-basic.t
+SHA1 2c9447514240fab2c68851da0e4f3dbbb2157767 README
+SHA1 ed6e21d5c05b80b4c88ea5fa8e1f2b4c1ae6bd63 lib/Devel/StackTrace.pm
+SHA1 a2379209b184d257b818ea03c2952e836a64c8f2 t/01-basic.t
+SHA1 b333a6989bdac5b9d7431b1cf1a849384233e38e 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)
 
-iD8DBQFH8PIq3Or3ZzQuifMRAsHmAKDBdm8n5a+3RzFpnCcnHyffXW/vkwCfbGiY
-sAENSuep9nmUWqfUmDi0Uw0=
-=/9D7
+iD8DBQFIUwad3Or3ZzQuifMRAlxuAKC17mlFO3ata9DGIOI17X/jzxUvUwCg17eo
+P1+KNfG1qrF+3syaW3Phajw=
+=1AYk
 -----END PGP SIGNATURE-----

Modified: trunk/libdevel-stacktrace-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-stacktrace-perl/debian/changelog?rev=21047&op=diff
==============================================================================
--- trunk/libdevel-stacktrace-perl/debian/changelog (original)
+++ trunk/libdevel-stacktrace-perl/debian/changelog Sat Jun 14 19:12:04 2008
@@ -1,3 +1,9 @@
+libdevel-stacktrace-perl (1.1901-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org>  Sat, 14 Jun 2008 21:10:48 +0200
+
 libdevel-stacktrace-perl (1.18-1) unstable; urgency=low
 
   * New upstream release (closes: #473601).

Modified: trunk/libdevel-stacktrace-perl/lib/Devel/StackTrace.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-stacktrace-perl/lib/Devel/StackTrace.pm?rev=21047&op=diff
==============================================================================
--- trunk/libdevel-stacktrace-perl/lib/Devel/StackTrace.pm (original)
+++ trunk/libdevel-stacktrace-perl/lib/Devel/StackTrace.pm Sat Jun 14 19:12:04 2008
@@ -1,9 +1,9 @@
 package Devel::StackTrace;
 
-use 5.005;
+use 5.006;
 
 use strict;
-use vars qw($VERSION);
+use warnings;
 
 use File::Spec;
 
@@ -11,7 +11,8 @@
     '""' => \&as_string,
     fallback => 1;
 
-$VERSION = '1.18';
+our $VERSION = '1.1901';
+
 
 sub new
 {
@@ -226,12 +227,14 @@
     return $st;
 }
 
-package Devel::StackTraceFrame;
+# Hide from PAUSE
+package
+    Devel::StackTraceFrame;
 
 use strict;
-use vars qw($VERSION);
-
-$VERSION = '0.6';
+use warnings;
+
+our $VERSION = $Devel::StackTrace::VERSION;
 
 # Create accessor routines
 BEGIN
@@ -247,8 +250,8 @@
 
 {
     my @fields =
-        ( qw( package filename line subroutine hasargs wantarray evaltext is_require ) );
-    push @fields, ( qw( hints bitmask ) ) if $] >= 5.006;
+        ( qw( package filename line subroutine hasargs wantarray
+              evaltext is_require hints bitmask ) );
 
     sub new
     {
@@ -329,20 +332,28 @@
                 $_ = $self->Devel::StackTrace::_ref_as_string($_)
                     if ref $_;
 
-                if ( $self->{max_arg_length}
-                     && length $_ > $self->{max_arg_length} )
+                eval
                 {
-                    substr( $_, $self->{max_arg_length} ) = '...';
+                    if ( $self->{max_arg_length}
+                         && length $_ > $self->{max_arg_length} )
+                    {
+                        substr( $_, $self->{max_arg_length} ) = '...';
+                    }
+
+                    s/'/\\'/g;
+
+                    # 'quote' arg unless it looks like a number
+                    $_ = "'$_'" unless /^-?[\d.]+$/;
+
+                    # print control/high ASCII chars as 'M-<char>' or '^<char>'
+                    s/([\200-\377])/sprintf("M-%c",ord($1)&0177)/eg;
+                    s/([\0-\37\177])/sprintf("^%c",ord($1)^64)/eg;
+                };
+
+                if ( my $e = $@ )
+                {
+                    $_ = $e =~ /malformed utf-8/i ? '(bad utf-8)' : '?';
                 }
-
-                s/'/\\'/g;
-
-                # 'quote' arg unless it looks like a number
-                $_ = "'$_'" unless /^-?[\d.]+$/;
-
-                # print control/high ASCII chars as 'M-<char>' or '^<char>'
-                s/([\200-\377])/sprintf("M-%c",ord($1)&0177)/eg;
-                s/([\0-\37\177])/sprintf("^%c",ord($1)^64)/eg;
             }
 
             # append ('all', 'the', 'arguments') to the $sub string
@@ -392,8 +403,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() as of Perl 5.6.0 though this module still
-works with 5.00503.
+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.
@@ -547,12 +557,6 @@
 Returns the arguments passed to the frame.  Note that any arguments
 that are references are returned as references, not copies.
 
-=back
-
-=head2 These only contain data as of Perl 5.6.0 or later
-
-=over 4
-
 =item * $frame->hints
 
 =item * $frame->bitmask

Modified: trunk/libdevel-stacktrace-perl/t/01-basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-stacktrace-perl/t/01-basic.t?rev=21047&op=diff
==============================================================================
--- trunk/libdevel-stacktrace-perl/t/01-basic.t (original)
+++ trunk/libdevel-stacktrace-perl/t/01-basic.t Sat Jun 14 19:12:04 2008
@@ -1,4 +1,5 @@
 use strict;
+use warnings;
 
 use Test::More;
 
@@ -53,7 +54,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 21
+main::foo at $test_file_name line 22
 EOF
 
     is( $trace->as_string, $trace_text, 'trace text' );
@@ -91,7 +92,7 @@
 
     my $trace_text = <<"EOF";
 Trace begun at $test_file_name line 1012
-main::baz at $test_file_name line 90
+main::baz at $test_file_name line 91
 EOF
 
     my $t = "$trace";
@@ -261,7 +262,7 @@
 
     my $trace_text = <<"EOF";
 Trace begun at $test_file_name line 1027
-main::max_arg_length('abcdefghij...') called at $test_file_name line 260
+main::max_arg_length('abcdefghij...') called at $test_file_name line 261
 EOF
 
     is( $trace->as_string, $trace_text, 'trace text' );




More information about the Pkg-perl-cvs-commits mailing list