r18083 - in /branches/upstream/libdevel-backtrace-perl/current: ./ examples/ lib/Devel/ lib/Devel/Backtrace/

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Fri Mar 28 20:00:54 UTC 2008


Author: gregoa-guest
Date: Fri Mar 28 20:00:53 2008
New Revision: 18083

URL: http://svn.debian.org/wsvn/?sc=1&rev=18083
Log:
[svn-upgrade] Integrating new upstream version, libdevel-backtrace-perl (0.07)

Added:
    branches/upstream/libdevel-backtrace-perl/current/examples/dollarat.pl
    branches/upstream/libdevel-backtrace-perl/current/lib/Devel/DollarAt.pm
Modified:
    branches/upstream/libdevel-backtrace-perl/current/Build.PL
    branches/upstream/libdevel-backtrace-perl/current/Changes
    branches/upstream/libdevel-backtrace-perl/current/LICENSE
    branches/upstream/libdevel-backtrace-perl/current/MANIFEST
    branches/upstream/libdevel-backtrace-perl/current/META.yml
    branches/upstream/libdevel-backtrace-perl/current/Makefile.PL
    branches/upstream/libdevel-backtrace-perl/current/README
    branches/upstream/libdevel-backtrace-perl/current/examples/basic.pl
    branches/upstream/libdevel-backtrace-perl/current/examples/skipme.pl
    branches/upstream/libdevel-backtrace-perl/current/lib/Devel/Backtrace.pm
    branches/upstream/libdevel-backtrace-perl/current/lib/Devel/Backtrace/Point.pm

Modified: branches/upstream/libdevel-backtrace-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libdevel-backtrace-perl/current/Build.PL?rev=18083&op=diff
==============================================================================
--- branches/upstream/libdevel-backtrace-perl/current/Build.PL (original)
+++ branches/upstream/libdevel-backtrace-perl/current/Build.PL Fri Mar 28 20:00:53 2008
@@ -12,6 +12,7 @@
     requires            => {
         'String::Escape'  => 0,
         'Class::Accessor' => 0,
+        'Carp'            => 0,
     },
     build_requires => {
         'Test::More' => 0,

Modified: branches/upstream/libdevel-backtrace-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libdevel-backtrace-perl/current/Changes?rev=18083&op=diff
==============================================================================
--- branches/upstream/libdevel-backtrace-perl/current/Changes (original)
+++ branches/upstream/libdevel-backtrace-perl/current/Changes Fri Mar 28 20:00:53 2008
@@ -16,3 +16,12 @@
 
 0.05    May 20 19:59:28 CEST 2007
         Make the tests work with perl 5.9
+
+0.06    Mar 27 15:17:04 CET 2008
+        Change the license to public domain.
+        Added Devel::DollarAt.
+        Added skipmysubs to Devel::Backtrace and called_package to
+        Devel::Backtrace::Point.
+
+0.07    Thu Mar 27 16:14:03 CET 2008
+        Some minor changes (nothing in the code).

Modified: branches/upstream/libdevel-backtrace-perl/current/LICENSE
URL: http://svn.debian.org/wsvn/branches/upstream/libdevel-backtrace-perl/current/LICENSE?rev=18083&op=diff
==============================================================================
--- branches/upstream/libdevel-backtrace-perl/current/LICENSE (original)
+++ branches/upstream/libdevel-backtrace-perl/current/LICENSE Fri Mar 28 20:00:53 2008
@@ -1,4 +1,3 @@
-Copyright (C) 2007 Christoph Bussenius.
+The Perl module distribution Devel::Backtrace is in the public domain.
 
-This program is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself.
+The author is Christoph Bussenius.

Modified: branches/upstream/libdevel-backtrace-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libdevel-backtrace-perl/current/MANIFEST?rev=18083&op=diff
==============================================================================
--- branches/upstream/libdevel-backtrace-perl/current/MANIFEST (original)
+++ branches/upstream/libdevel-backtrace-perl/current/MANIFEST Fri Mar 28 20:00:53 2008
@@ -1,10 +1,12 @@
 Build.PL
 Changes
 examples/basic.pl
+examples/dollarat.pl
 examples/skipme.pl
 INSTALL
 lib/Devel/Backtrace.pm
 lib/Devel/Backtrace/Point.pm
+lib/Devel/DollarAt.pm
 LICENSE
 Makefile.PL
 MANIFEST			This list of files

Modified: branches/upstream/libdevel-backtrace-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libdevel-backtrace-perl/current/META.yml?rev=18083&op=diff
==============================================================================
--- branches/upstream/libdevel-backtrace-perl/current/META.yml (original)
+++ branches/upstream/libdevel-backtrace-perl/current/META.yml Fri Mar 28 20:00:53 2008
@@ -1,6 +1,6 @@
 ---
 name: Devel-Backtrace
-version: 0.05
+version: 0.07
 author:
   - 'Christoph Bussenius <pepe at cpan.org>'
 abstract: Object-oriented backtrace
@@ -8,6 +8,7 @@
 resources:
   license: http://dev.perl.org/licenses/
 requires:
+  Carp: 0
   Class::Accessor: 0
   String::Escape: 0
 build_requires:
@@ -15,9 +16,12 @@
 provides:
   Devel::Backtrace:
     file: lib/Devel/Backtrace.pm
-    version: 0.05
+    version: 0.07
   Devel::Backtrace::Point:
     file: lib/Devel/Backtrace/Point.pm
+  Devel::DollarAt:
+    file: lib/Devel/DollarAt.pm
+    version: 0.02
 generated_by: Module::Build version 0.2807
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.2.html

Modified: branches/upstream/libdevel-backtrace-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libdevel-backtrace-perl/current/Makefile.PL?rev=18083&op=diff
==============================================================================
--- branches/upstream/libdevel-backtrace-perl/current/Makefile.PL (original)
+++ branches/upstream/libdevel-backtrace-perl/current/Makefile.PL Fri Mar 28 20:00:53 2008
@@ -10,7 +10,8 @@
           'PREREQ_PM' => {
                            'Test::More' => 0,
                            'String::Escape' => 0,
-                           'Class::Accessor' => 0
+                           'Class::Accessor' => 0,
+                           'Carp' => 0
                          }
         )
 ;

Modified: branches/upstream/libdevel-backtrace-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/libdevel-backtrace-perl/current/README?rev=18083&op=diff
==============================================================================
--- branches/upstream/libdevel-backtrace-perl/current/README (original)
+++ branches/upstream/libdevel-backtrace-perl/current/README Fri Mar 28 20:00:53 2008
@@ -2,7 +2,7 @@
     Devel::Backtrace - Object-oriented backtrace
 
 VERSION
-    This is version 0.05.
+    This is version 0.07.
 
 SYNOPSIS
         my $backtrace = Devel::Backtrace->new;
@@ -47,6 +47,17 @@
     This module ships with an example "skipme.pl" that demonstrates how to
     use this method.
 
+  $backtrace->skipmysubs([$package])
+    This method is like "skipme" except that it deletes calls *to* the
+    package rather than calls *from* the package. Usually this means that it
+    deletes exactly one more tracepoint than "skipme".
+
+    Before discarding those calls, "skipme" is called. This is because
+    usually the topmost call in the stack is to Devel::Backtrace->new, which
+    would not be catched by "skipmysubs" otherwise.
+
+    See also the example "skipme.pl".
+
   $backtrace->to_string()
     Returns a string that contains one line for each tracepoint. It will
     contain the information from "Devel::Backtrace::Point"'s to_string()
@@ -78,12 +89,17 @@
     Carp::Trace is a simpler module which gives you a backtrace in string
     form.
 
+    Devel::DollarAt comes with this distribution and is a nice application
+    of this module. You can use it for debugging to get a backtrace out of
+    $@.
+
 AUTHOR
     Christoph Bussenius <pepe at cpan.org>
 
+    If you use this module, I'll be glad if you drop me a note. You should
+    mention this module's name in the subject of your mails, in order to
+    make sure they won't get lost in all the spam.
+
 COPYRIGHT
-    Copyright (C) 2007 Christoph Bussenius.
+    This module is in the public domain.
 
-    This program is free software; you can redistribute it and/or modify it
-    under the same terms as Perl itself.
-

Modified: branches/upstream/libdevel-backtrace-perl/current/examples/basic.pl
URL: http://svn.debian.org/wsvn/branches/upstream/libdevel-backtrace-perl/current/examples/basic.pl?rev=18083&op=diff
==============================================================================
--- branches/upstream/libdevel-backtrace-perl/current/examples/basic.pl (original)
+++ branches/upstream/libdevel-backtrace-perl/current/examples/basic.pl Fri Mar 28 20:00:53 2008
@@ -24,6 +24,9 @@
 
     print "The line number from the second line of the first backtrace:\n";
     print $backtrace1->point(1)->line, "\n";
+
+    print "The called package from the first line of the first backtrace:\n";
+    print $backtrace1->point(0)->called_package, "\n";
 }
 
 
@@ -36,20 +39,20 @@
 First backtrace:
 Devel::Backtrace::new called from main (basic.pl:12)
 main::bar called from main (basic.pl:8)
-main::foo called from main (basic.pl:30)
+main::foo called from main (basic.pl:33)
 
 Second (shorter) backtrace:
 main::bar called from main (basic.pl:8)
-main::foo called from main (basic.pl:30)
+main::foo called from main (basic.pl:33)
 
 Third (even shorter) backtrace:
-main::foo called from main (basic.pl:30)
+main::foo called from main (basic.pl:33)
 
 The third backtrace in a very long form:
 (Note that the bitmask may depend on the perl version.)
 package: main
 filename: basic.pl
-line: 30
+line: 33
 subroutine: main::foo
 hasargs: 1
 wantarray: undef
@@ -60,3 +63,6 @@
 
 The line number from the second line of the first backtrace:
 8
+
+The called package from the first line of the first backtrace:
+Devel::Backtrace

Added: branches/upstream/libdevel-backtrace-perl/current/examples/dollarat.pl
URL: http://svn.debian.org/wsvn/branches/upstream/libdevel-backtrace-perl/current/examples/dollarat.pl?rev=18083&op=file
==============================================================================
--- branches/upstream/libdevel-backtrace-perl/current/examples/dollarat.pl (added)
+++ branches/upstream/libdevel-backtrace-perl/current/examples/dollarat.pl Fri Mar 28 20:00:53 2008
@@ -1,0 +1,16 @@
+#!perl
+use strict;
+use warnings;
+use Devel::DollarAt;
+
+eval '0/0';
+
+print "Error line is ", $@->line, "\n";
+print "Error text is $@";
+
+__END__
+
+Output:
+
+Error line is 2
+Error text is Illegal division by zero at (eval 3) line 2.

Modified: branches/upstream/libdevel-backtrace-perl/current/examples/skipme.pl
URL: http://svn.debian.org/wsvn/branches/upstream/libdevel-backtrace-perl/current/examples/skipme.pl?rev=18083&op=diff
==============================================================================
--- branches/upstream/libdevel-backtrace-perl/current/examples/skipme.pl (original)
+++ branches/upstream/libdevel-backtrace-perl/current/examples/skipme.pl Fri Mar 28 20:00:53 2008
@@ -49,7 +49,17 @@
         # calls which Baz method.
         $backtrace->skipme;
 
+        print "skipme result:\n";
         print $backtrace;
+
+        my $backtrace2 = Devel::Backtrace->new;
+
+        # Tell Devel::Backtrace that we are not even interested where the first
+        # Baz method was called.
+        $backtrace2->skipmysubs;
+
+        print "\nskipmycalls result:\n";
+        print $backtrace2;
     }
 }
 
@@ -57,8 +67,15 @@
 
 Output:
 
+skipme result:
 Baz::baz1 called from Bar (skipme.pl:30)
 Bar::bar2 called from Bar (skipme.pl:26)
 Bar::bar1 called from Foo (skipme.pl:18)
 Foo::foo2 called from Foo (skipme.pl:14)
 Foo::foo1 called from main (skipme.pl:8)
+
+skipmycalls result:
+Bar::bar2 called from Bar (skipme.pl:26)
+Bar::bar1 called from Foo (skipme.pl:18)
+Foo::foo2 called from Foo (skipme.pl:14)
+Foo::foo1 called from main (skipme.pl:8)

Modified: branches/upstream/libdevel-backtrace-perl/current/lib/Devel/Backtrace.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdevel-backtrace-perl/current/lib/Devel/Backtrace.pm?rev=18083&op=diff
==============================================================================
--- branches/upstream/libdevel-backtrace-perl/current/lib/Devel/Backtrace.pm (original)
+++ branches/upstream/libdevel-backtrace-perl/current/lib/Devel/Backtrace.pm Fri Mar 28 20:00:53 2008
@@ -11,11 +11,11 @@
 
 =head1 VERSION
 
-This is version 0.05.
-
-=cut
-
-our $VERSION = '0.05';
+This is version 0.07.
+
+=cut
+
+our $VERSION = '0.07';
 
 =head1 SYNOPSIS
 
@@ -105,7 +105,34 @@
     my $package = @_ ? $_[0] : caller;
 
     my $skip;
-    $skip = shift @$this while @$this and $package eq $this->point(0)->package;
+    while (@$this and $package eq $this->point(0)->package) {
+        $skip = shift @$this;
+    }
+    return $skip;
+}
+
+=head2 $backtrace->skipmysubs([$package])
+
+This method is like C<skipme> except that it deletes calls I<to> the package
+rather than calls I<from> the package.  Usually this means that it deletes
+exactly one more tracepoint than C<skipme>.
+
+Before discarding those calls, C<skipme> is called.  This is because usually
+the topmost call in the stack is to Devel::Backtrace->new, which would not be
+catched by C<skipmysubs> otherwise.
+
+See also the example "skipme.pl".
+
+=cut
+
+sub skipmysubs {
+    my $this = shift;
+    my $package = @_ ? $_[0] : caller;
+
+    my $skip = $this->skipme($package);
+    while (@$this and $package eq $this->point(0)->called_package) {
+        $skip = shift @$this;
+    }
     return $skip;
 }
 
@@ -162,15 +189,19 @@
 
 L<Carp::Trace> is a simpler module which gives you a backtrace in string form.
 
+L<Devel::DollarAt> comes with this distribution and is a nice application of
+this module.  You can use it for debugging to get a backtrace out of $@.
+
 =head1 AUTHOR
 
 Christoph Bussenius <pepe at cpan.org>
 
+If you use this module, I'll be glad if you drop me a note.
+You should mention this module's name in the subject of your mails, in order to
+make sure they won't get lost in all the spam.
+
 =head1 COPYRIGHT
 
-Copyright (C) 2007 Christoph Bussenius.
-
-This program is free software; you can redistribute it and/or modify it under
-the same terms as Perl itself.
-
-=cut
+This module is in the public domain.
+
+=cut

Modified: branches/upstream/libdevel-backtrace-perl/current/lib/Devel/Backtrace/Point.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdevel-backtrace-perl/current/lib/Devel/Backtrace/Point.pm?rev=18083&op=diff
==============================================================================
--- branches/upstream/libdevel-backtrace-perl/current/lib/Devel/Backtrace/Point.pm (original)
+++ branches/upstream/libdevel-backtrace-perl/current/lib/Devel/Backtrace/Point.pm Fri Mar 28 20:00:53 2008
@@ -65,6 +65,21 @@
 =cut
 
 __PACKAGE__->mk_ro_accessors(FIELDS);
+
+=head2 $p->called_package
+
+This returns the package that $p->subroutine is in.
+
+=cut
+
+sub called_package {
+    my $this = shift;
+    my $sub = $this->subroutine;
+
+    my $idx = rindex($sub, '::');
+    return '(unknown)' if -1 == $idx;
+    return substr($sub, 0, $idx);
+}
 
 =head2 $p->by_index($i)
 

Added: branches/upstream/libdevel-backtrace-perl/current/lib/Devel/DollarAt.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdevel-backtrace-perl/current/lib/Devel/DollarAt.pm?rev=18083&op=file
==============================================================================
--- branches/upstream/libdevel-backtrace-perl/current/lib/Devel/DollarAt.pm (added)
+++ branches/upstream/libdevel-backtrace-perl/current/lib/Devel/DollarAt.pm Fri Mar 28 20:00:53 2008
@@ -1,0 +1,305 @@
+package Devel::DollarAt;
+use strict;
+use warnings;
+use base qw(Class::Accessor::Fast);
+use Devel::Backtrace;
+
+our $VERSION = '0.02';
+
+__PACKAGE__->mk_accessors(
+    qw(backtrace err propagated inputline inputhandle filename line)
+);
+
+# Note that to_string also internally called if an exception isn't catched by
+# any eval and the error must be printed to STDERR.
+use overload '""' => \&to_string;
+
+$SIG{__DIE__} = \&_diehandler;
+
+our $FRAME;
+
+# This will be called every time the code says "die".  However it won't be
+# called for other errors, such as division by zero.  So we still have to use
+# $SIG{__DIE__}.
+*CORE::GLOBAL::die = sub (@) {
+    my $text = '';
+    defined and $text .= $_ for @_;
+
+    my $err = $@;
+
+    if (defined($err) && length($err) && !length $text) {
+	# In this case, perl would pass "$@\t...propagated at foo line bar.\n"
+	# to the __DIE__ handler.  Because we don't want to parse that, we make
+	# perl think $text is not empty.
+
+	# We have to store $err in our NullMessage because perl will cleanse $@
+	# before calling the __DIE__ handler.  This is very strange, because it
+	# won't get cleansed if we don't override *CORE::GLOBAL::die.
+	$text = Devel::DollarAt::NullMessage->_new(propagated=>$err);
+    }
+
+    CORE::die($text);
+};
+
+sub _diehandler {
+    my ($err) = @_;
+
+    my $propagated = $@;
+
+    if (ref($err) && $err->isa('Devel::DollarAt::NullMessage')) {
+	$propagated = $err->{propagated};
+	$err = '';
+    }
+
+    my $backtrace = Devel::Backtrace->new(1);
+    my $skip = $backtrace->skipmysubs(); # skips this handler plus our overridden
+				         # CORE::GLOBAL::die if possible
+    CORE::die "Strange:\n$backtrace" unless $skip;
+
+    my ($inputhandle, $inputline);
+    if ($err =~ s/^(.*) at .*?(?:<(.*)> line (\d+)|)\.\n\z/$1/s) {
+	($inputhandle, $inputline) = ($2, $3);
+    }
+
+    my $dollarat = __PACKAGE__->_new({
+	    backtrace => $backtrace,
+	    err => $err,
+	    filename => $skip->filename,
+	    line => $skip->line,
+	}
+    );
+
+    if (defined $inputline) {
+	$dollarat->inputline($inputline);
+	$dollarat->inputhandle($inputhandle);
+    }
+
+    if (defined $propagated and length $propagated) {
+	$dollarat->propagated($propagated);
+    }
+
+    CORE::die($dollarat);
+}
+
+# Try to appear exactly like the normal $@
+sub to_string {
+    my $this = shift;
+
+    my $text = $this->err;
+
+    if (defined ($this->propagated)) {
+	if (!length($text)) {
+	    $text = $this->propagated . "\t...propagated";
+	}
+    }
+
+    unless ($text =~ /\n\z/) {
+	$text .= ' at ' . $this->filename . ' line ' . $this->line;
+	if (defined $this->inputline) {
+	    $text .= ', <'.$this->inputhandle . '> line ' . $this->inputline;
+	}
+    }
+
+    $text .= '.';
+    $text = "[[$text]]" if $FRAME;
+    $text .= "\n";
+
+    return $text;
+}
+
+sub _new {
+    my $class = shift;
+    my $this = $class->SUPER::new(@_);
+
+    return $this;
+}
+
+sub import {
+    my $class = shift;
+    for (@_) {
+	if ('frame' eq $_) {
+	    $FRAME = 1;
+	} else {
+	    die 'Unknown parameter for '.__PACKAGE__.": $_";
+	}
+    };
+}
+
+sub redie {
+    my $this = shift;
+    my ($package, $filename, $line) = caller;
+    push @{$this->{redispatch_points}}, Devel::DollarAt::RedispatchPoint->new({
+	    package => $package,
+	    filename => $filename,
+	    line => $line,
+	}
+    );
+    local $SIG{__DIE__};
+    CORE::die($this);
+}
+
+sub redispatch_points {
+    my $this = shift;
+    return @{$this->{redispatch_points} || []};
+}
+
+package # hide from pause
+    Devel::DollarAt::NullMessage;
+#use overload '""' => sub {''};
+sub _new { shift; bless {@_}; }
+
+package # hide from pause
+        Devel::DollarAt::RedispatchPoint;
+use base qw(Class::Accessor::Fast);
+__PACKAGE__->mk_ro_accessors(qw(package filename line));
+
+use overload '""' => sub {
+    my $this = shift;
+
+    return 'redispatched from '.$this->package.' at '
+    .$this->filename.':'.$this->line."\n";
+};
+
+1
+__END__
+
+=head1 NAME
+
+Devel::DollarAt - Give magic abilities to $@
+
+=head1 SYNOPSIS
+
+    use Devel::DollarAt;
+
+    eval "0/0";
+    print $@, $@->backtrace;
+    $@->redie;
+
+=head1 DESCRIPTION
+
+Using eval {}, you may catch Perl exceptions almost like you do it with try {}
+in Java.  However there are days when you miss some features of exceptions.
+The only thing you know about the error that occured is the string $@, which
+combines the error message and technical data like the line number.
+
+The Devel::DollarAt module gives some functionality to the $@ scalar.  Once you
+say "use Devel::DollarAt", the module is active program-wide.  If an exception
+occurs anywhere in any module, $@ will be globally set to an object of class
+Devel::DollarAt.  Apart from performance, this shouldn't be a problem because
+$@ tries to be downwardly compatible to the normal $@.  However using this
+package in CPAN modules or large software projects is discouraged.
+
+=head1 DISCLAIMER
+
+Use this module only for debugging.  Don't think of it as an exception
+framework for Perl or something like that.  It just gives magic abilities to
+$@, that's all.
+
+=head1 METHODS
+
+=over 8
+
+=item backtrace
+
+Returns a L<Devel::Backtrace> object, which lets you inspect the callers of the
+fatality.
+
+=item filename
+
+Returns the name of the file in which the error occured.
+
+=item inputhandle
+
+Returns the file handle which has most recently be read from at the time of the
+error.
+
+=item inputline
+
+Returns the line number of C<$@->inputhandle> (which is $.) at the time of the
+error.
+
+=item line
+
+Returns the number of the line in which the error occured.
+
+=item redie
+
+Redispatches this exception to the next eval{}.
+
+=item redispatch_points
+
+Returns a list of objects with informations about when this exception was
+redispatched.  Each object has got the accessors "package", "filename" and
+"line".  In string context, the objects will look like "redispatched from
+FooPackage at file.pl:17\n".
+
+=item to_string
+
+Returns a string that looks quite like the normal $@, e. g. "Illegal division
+by zero at foo.pl line 42, <> line 13."  Devel::DollarAt overloads the ""
+(stringification) operator to this method.
+
+=back
+
+
+=head1 EXAMPLES
+
+A very simple (and pointless) way to use Devel::DollarAt is this oneliner:
+
+    perl -MDevel::DollarAt -e '0/0'
+
+It bails out with "Illegal division by zero at -e line 1." and an exit status
+of 1, just like it would have done if you hadn't supplied -MDevel::DollarAt.
+This is because the magically modified $@ variable gets stringified when perl
+prints it as exit reason.  If you actually want to see the difference, use
+
+    perl -MDevel::DollarAt=frame -e '0/0'
+
+This bails out with "[[Illegal division by zero at -e line 1.]]" so you can see
+that something has happened.
+
+=head1 KNOWN PROBLEMS
+
+This module requires that no other code tampers with C<$SIG{__DIE__}> or
+C<*CORE::GLOBAL::die>.
+
+A not widely known feature of Perl is that it can propagate $@.  If you call
+die() without parameters or with an empty string or an undefined value, the
+error message will be "Died".  However, if $@ was set to some value before
+this, the previous error message will be used with "\t...propagated" appended:
+
+    perl -e '$@="7"; die"
+    7       ...propagated at -e line 1.
+
+Devel::DollarAt emulates this behaviour.
+
+If you use the above example but leave out the double quotes, perl's behaviour
+is different as of version 5.8.8:
+
+    perl -e '$@=7; die'
+    7 at -e line 1.
+
+Devel::DollarAt does not emulate this behaviour:
+
+    perl -MDevel::DollarAt -e '$@=7; die'
+    7       ...propagated at -e line 1.
+
+If a previous $@ is propagated, inputhandle and inputline won't work.  They
+won't be interpolated into the stringified $@, either.
+
+If perl comes across syntax errors, $@ appears to be just a string as usual.
+Apparently C<$SIG{__DIE__}> won't be called for syntax errors.
+
+=head1 AUTHOR
+
+Christoph Bussenius <pepe at cpan.org>
+
+If you use this module, I'll be glad if you drop me a note.
+You should mention this module's name in the subject of your mails, in order to
+make sure they won't get lost in all the spam.
+
+=head1 COPYRIGHT
+
+This module is in the public domain.
+
+=cut




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