r18157 - in /trunk/libdevel-backtrace-perl: Build.PL Changes META.yml README debian/changelog debian/copyright examples/basic.pl examples/dollarat.pl examples/skipme.pl lib/Devel/Backtrace.pm lib/Devel/Backtrace/Point.pm t/examples.t
roberto at users.alioth.debian.org
roberto at users.alioth.debian.org
Sun Mar 30 19:25:30 UTC 2008
Author: roberto
Date: Sun Mar 30 19:25:29 2008
New Revision: 18157
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=18157
Log:
* New upstream release.
* Place Debian packaging in PD to match module license.
Modified:
trunk/libdevel-backtrace-perl/Build.PL
trunk/libdevel-backtrace-perl/Changes
trunk/libdevel-backtrace-perl/META.yml
trunk/libdevel-backtrace-perl/README
trunk/libdevel-backtrace-perl/debian/changelog
trunk/libdevel-backtrace-perl/debian/copyright
trunk/libdevel-backtrace-perl/examples/basic.pl
trunk/libdevel-backtrace-perl/examples/dollarat.pl
trunk/libdevel-backtrace-perl/examples/skipme.pl
trunk/libdevel-backtrace-perl/lib/Devel/Backtrace.pm
trunk/libdevel-backtrace-perl/lib/Devel/Backtrace/Point.pm
trunk/libdevel-backtrace-perl/t/examples.t
Modified: trunk/libdevel-backtrace-perl/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-backtrace-perl/Build.PL?rev=18157&op=diff
==============================================================================
--- trunk/libdevel-backtrace-perl/Build.PL (original)
+++ trunk/libdevel-backtrace-perl/Build.PL Sun Mar 30 19:25:29 2008
@@ -9,6 +9,9 @@
license => 'perl',
dist_author => 'Christoph Bussenius <pepe at cpan.org>',
dist_version_from => 'lib/Devel/Backtrace.pm',
+ no_index => {
+ directory => 'example',
+ },
requires => {
'String::Escape' => 0,
'Class::Accessor' => 0,
Modified: trunk/libdevel-backtrace-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-backtrace-perl/Changes?rev=18157&op=diff
==============================================================================
--- trunk/libdevel-backtrace-perl/Changes (original)
+++ trunk/libdevel-backtrace-perl/Changes Sun Mar 30 19:25:29 2008
@@ -25,3 +25,15 @@
0.07 Thu Mar 27 16:14:03 CET 2008
Some minor changes (nothing in the code).
+
+0.08 Sat Mar 29 18:43:42 CET 2008
+ Added some documentation fixes.
+ Previously, some tests were skipped in perl 5.6. I made them work in
+ 5.6 and don't skip them any more.
+ Previously, a test failed in 5.10 because perl 5.8 and 5.10 sometimes
+ generate different line numbers in error messages. I made the test
+ work (see examples/dollarat.pl).
+
+0.09 Sun Mar 30 16:08:25 CEST 2008
+ Documentation fixes
+ Added version to Devel::Backtrace::Point
Modified: trunk/libdevel-backtrace-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-backtrace-perl/META.yml?rev=18157&op=diff
==============================================================================
--- trunk/libdevel-backtrace-perl/META.yml (original)
+++ trunk/libdevel-backtrace-perl/META.yml Sun Mar 30 19:25:29 2008
@@ -1,6 +1,6 @@
---
name: Devel-Backtrace
-version: 0.07
+version: 0.09
author:
- 'Christoph Bussenius <pepe at cpan.org>'
abstract: Object-oriented backtrace
@@ -16,12 +16,15 @@
provides:
Devel::Backtrace:
file: lib/Devel/Backtrace.pm
- version: 0.07
+ version: 0.09
Devel::Backtrace::Point:
file: lib/Devel/Backtrace/Point.pm
+ version: 0.09
Devel::DollarAt:
file: lib/Devel/DollarAt.pm
version: 0.02
+no_index:
+ directory: example
generated_by: Module::Build version 0.2807
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.2.html
Modified: trunk/libdevel-backtrace-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-backtrace-perl/README?rev=18157&op=diff
==============================================================================
--- trunk/libdevel-backtrace-perl/README (original)
+++ trunk/libdevel-backtrace-perl/README Sun Mar 30 19:25:29 2008
@@ -2,7 +2,7 @@
Devel::Backtrace - Object-oriented backtrace
VERSION
- This is version 0.07.
+ This is version 0.09.
SYNOPSIS
my $backtrace = Devel::Backtrace->new;
@@ -45,18 +45,19 @@
The effect is similar to what the Carp module does.
This module ships with an example "skipme.pl" that demonstrates how to
- use this method.
+ use this method. See also "EXAMPLES".
$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".
+ package rather than calls *from* the package.
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".
+ This means that skipmysubs usually deletes more lines than skipme would.
+
+ See also "EXAMPLES" and the example "skipme.pl".
$backtrace->to_string()
Returns a string that contains one line for each tracepoint. It will
@@ -78,9 +79,14 @@
EXAMPLES
A sample stringification might look like this:
- Devel::Backtrace::new called from main (foo.pl:10)
+ Devel::Backtrace::new called from MyPackage (foo.pl:30)
+ MyPackage::test2 called from MyPackage (foo.pl:28)
+ MyPackage::test1 called from main (foo.pl:18)
main::bar called from main (foo.pl:6)
main::foo called from main (foo.pl:13)
+
+ If MyPackage called skipme, the first two lines would be removed. If it
+ called skipmysubs, the first three lines would be removed.
SEE ALSO
Devel::StackTrace does mostly the same as this module. I'm afraid I
Modified: trunk/libdevel-backtrace-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-backtrace-perl/debian/changelog?rev=18157&op=diff
==============================================================================
--- trunk/libdevel-backtrace-perl/debian/changelog (original)
+++ trunk/libdevel-backtrace-perl/debian/changelog Sun Mar 30 19:25:29 2008
@@ -1,18 +1,16 @@
-libdevel-backtrace-perl (0.07-1) UNRELEASED; urgency=low
-
- TODO: clarify packaging license now that upstream
- moved from "same as Perl" to "public domain"
+libdevel-backtrace-perl (0.09-1) unstable; urgency=low
[ Roberto C. Sanchez ]
* Added watch file.
+ * New upstream release.
+ * Place Debian packaging in PD to match module license.
[ gregor herrmann ]
- * New upstream release.
* debian/copyright: adapt according to upstream changes.
* Add /me to Uploaders.
* debian/rules: minor updates.
- -- gregor herrmann <gregor+debian at comodo.priv.at> Fri, 28 Mar 2008 21:10:45 +0100
+ -- Roberto C. Sanchez <roberto at connexer.com> Sun, 30 Mar 2008 15:24:45 -0400
libdevel-backtrace-perl (0.05-1) unstable; urgency=low
Modified: trunk/libdevel-backtrace-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-backtrace-perl/debian/copyright?rev=18157&op=diff
==============================================================================
--- trunk/libdevel-backtrace-perl/debian/copyright (original)
+++ trunk/libdevel-backtrace-perl/debian/copyright Sun Mar 30 19:25:29 2008
@@ -8,12 +8,8 @@
The Perl module distribution Devel::Backtrace is in the public domain.
Files: debian/*
-Copyright: (c) 2008, Roberto C. Sanchez <roberto at connexer.com>
-License: GPL-1+ | Artistic
+Copyright: -
+License: PD
It is assumed that all contributors release their packaging works under the
same term as the module itself.
-On Debian GNU/Linux systems, the complete text of the GNU General Public
-License can be found in `/usr/share/common-licenses/GPL' and the Artistic
-Licence in `/usr/share/common-licenses/Artistic'.
-
Modified: trunk/libdevel-backtrace-perl/examples/basic.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-backtrace-perl/examples/basic.pl?rev=18157&op=diff
==============================================================================
--- trunk/libdevel-backtrace-perl/examples/basic.pl (original)
+++ trunk/libdevel-backtrace-perl/examples/basic.pl Sun Mar 30 19:25:29 2008
@@ -37,21 +37,21 @@
Output:
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:33)
+Devel::Backtrace::new called from main (examples/basic.pl:12)
+main::bar called from main (examples/basic.pl:8)
+main::foo called from main (examples/basic.pl:33)
Second (shorter) backtrace:
-main::bar called from main (basic.pl:8)
-main::foo called from main (basic.pl:33)
+main::bar called from main (examples/basic.pl:8)
+main::foo called from main (examples/basic.pl:33)
Third (even shorter) backtrace:
-main::foo called from main (basic.pl:33)
+main::foo called from main (examples/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
+filename: examples/basic.pl
line: 33
subroutine: main::foo
hasargs: 1
Modified: trunk/libdevel-backtrace-perl/examples/dollarat.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-backtrace-perl/examples/dollarat.pl?rev=18157&op=diff
==============================================================================
--- trunk/libdevel-backtrace-perl/examples/dollarat.pl (original)
+++ trunk/libdevel-backtrace-perl/examples/dollarat.pl Sun Mar 30 19:25:29 2008
@@ -3,7 +3,10 @@
use warnings;
use Devel::DollarAt;
-eval '0/0';
+eval '0/0; "foo"';
+
+# Don't worry about the "foo"; it serves to make perl 5.8 and 5.10 output the
+# same line number so I can use this example in the tests.
print "Error line is ", $@->line, "\n";
print "Error text is $@";
@@ -12,5 +15,5 @@
Output:
-Error line is 2
-Error text is Illegal division by zero at (eval 3) line 2.
+Error line is 1
+Error text is Illegal division by zero at (eval 3) line 1.
Modified: trunk/libdevel-backtrace-perl/examples/skipme.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-backtrace-perl/examples/skipme.pl?rev=18157&op=diff
==============================================================================
--- trunk/libdevel-backtrace-perl/examples/skipme.pl (original)
+++ trunk/libdevel-backtrace-perl/examples/skipme.pl Sun Mar 30 19:25:29 2008
@@ -68,14 +68,14 @@
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)
+Baz::baz1 called from Bar (examples/skipme.pl:30)
+Bar::bar2 called from Bar (examples/skipme.pl:26)
+Bar::bar1 called from Foo (examples/skipme.pl:18)
+Foo::foo2 called from Foo (examples/skipme.pl:14)
+Foo::foo1 called from main (examples/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)
+Bar::bar2 called from Bar (examples/skipme.pl:26)
+Bar::bar1 called from Foo (examples/skipme.pl:18)
+Foo::foo2 called from Foo (examples/skipme.pl:14)
+Foo::foo1 called from main (examples/skipme.pl:8)
Modified: trunk/libdevel-backtrace-perl/lib/Devel/Backtrace.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-backtrace-perl/lib/Devel/Backtrace.pm?rev=18157&op=diff
==============================================================================
--- trunk/libdevel-backtrace-perl/lib/Devel/Backtrace.pm (original)
+++ trunk/libdevel-backtrace-perl/lib/Devel/Backtrace.pm Sun Mar 30 19:25:29 2008
@@ -11,11 +11,11 @@
=head1 VERSION
-This is version 0.07.
-
-=cut
-
-our $VERSION = '0.07';
+This is version 0.09.
+
+=cut
+
+our $VERSION = '0.09';
=head1 SYNOPSIS
@@ -96,7 +96,7 @@
The effect is similar to what the L<Carp> module does.
This module ships with an example "skipme.pl" that demonstrates how to use this
-method.
+method. See also L</EXAMPLES>.
=cut
@@ -114,14 +114,15 @@
=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>.
+rather than calls I<from> the package.
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".
+This means that skipmysubs usually deletes more lines than skipme would.
+
+See also L</EXAMPLES> and the example "skipme.pl".
=cut
@@ -178,9 +179,14 @@
A sample stringification might look like this:
- Devel::Backtrace::new called from main (foo.pl:10)
+ Devel::Backtrace::new called from MyPackage (foo.pl:30)
+ MyPackage::test2 called from MyPackage (foo.pl:28)
+ MyPackage::test1 called from main (foo.pl:18)
main::bar called from main (foo.pl:6)
main::foo called from main (foo.pl:13)
+
+If MyPackage called skipme, the first two lines would be removed. If it called
+skipmysubs, the first three lines would be removed.
=head1 SEE ALSO
Modified: trunk/libdevel-backtrace-perl/lib/Devel/Backtrace/Point.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-backtrace-perl/lib/Devel/Backtrace/Point.pm?rev=18157&op=diff
==============================================================================
--- trunk/libdevel-backtrace-perl/lib/Devel/Backtrace/Point.pm (original)
+++ trunk/libdevel-backtrace-perl/lib/Devel/Backtrace/Point.pm Sun Mar 30 19:25:29 2008
@@ -1,6 +1,7 @@
package Devel::Backtrace::Point;
use strict;
use warnings;
+our $VERSION = '0.09';
use Carp;
use String::Escape qw(printable);
Modified: trunk/libdevel-backtrace-perl/t/examples.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-backtrace-perl/t/examples.t?rev=18157&op=diff
==============================================================================
--- trunk/libdevel-backtrace-perl/t/examples.t (original)
+++ trunk/libdevel-backtrace-perl/t/examples.t Sun Mar 30 19:25:29 2008
@@ -10,11 +10,13 @@
BEGIN {
# Several arguments for open, "-|" needed.
# This will only work on non-windows, perl >= 5.8.0
+ # Update: Now I trick around that, thus making it work on perl 5.6. Dunno
+ # if it works on windows though.
$^O =~ /MSWin32/i
and plan skip_all => 'This test requires an operating system.';
- local $@;
- eval 'use 5.008_000; 1'
- or plan skip_all => "This test won't work on your perl version.";
+ #local $@;
+ #eval 'use 5.008_000; 1'
+ # or plan skip_all => "This test won't work on your perl version.";
}
use File::Spec;
@@ -23,15 +25,25 @@
if (! -d $exampledir) {
$exampledir = File::Spec->catfile('..', $exampledir);
}
-chdir($exampledir) or die "$exampledir: $!";
-my @examples = <*.pl>;
+my @examples = <$exampledir/*.pl>;
+
+die "No examples found in $exampledir." unless @examples;
plan tests => scalar(@examples);
for my $example (@examples) {
- open my $pipe, '-|', $^X, $example
- or die "run $example: $!";
+ # Won't work on perl 5.6:
+ # open my $pipe, '-|', $^X, $example
+ # or die "run $example: $!";
+
+ my $pid = open my $pipe, '-|';
+ die $! unless defined $pid;
+ if (0 == $pid) {
+ exec ($^X, $example);
+ die $!;
+ }
+
my $output = do {local $/; <$pipe>};
die $! unless defined $output;
close $pipe or die "$example: exited $?";
More information about the Pkg-perl-cvs-commits
mailing list