r45479 - in /branches/upstream/liblog-handler-perl/current: ChangeLog META.yml README lib/Log/Handler.pm lib/Log/Handler/Simple.pm
carnil-guest at users.alioth.debian.org
carnil-guest at users.alioth.debian.org
Thu Oct 8 14:00:13 UTC 2009
Author: carnil-guest
Date: Thu Oct 8 13:59:59 2009
New Revision: 45479
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=45479
Log:
[svn-upgrade] Integrating new upstream version, liblog-handler-perl (0.58)
Modified:
branches/upstream/liblog-handler-perl/current/ChangeLog
branches/upstream/liblog-handler-perl/current/META.yml
branches/upstream/liblog-handler-perl/current/README
branches/upstream/liblog-handler-perl/current/lib/Log/Handler.pm
branches/upstream/liblog-handler-perl/current/lib/Log/Handler/Simple.pm
Modified: branches/upstream/liblog-handler-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblog-handler-perl/current/ChangeLog?rev=45479&op=diff
==============================================================================
--- branches/upstream/liblog-handler-perl/current/ChangeLog (original)
+++ branches/upstream/liblog-handler-perl/current/ChangeLog Thu Oct 8 13:59:59 2009
@@ -1,3 +1,7 @@
+0.58 Released at 2009-10-07.
+ - Forget to kick Devel::Backtrace from Log::Handler::Simple.
+ - Log::Handler::Simple will be kicked in the next release.
+
0.57 Released at 2009-10-06.
- Kicked UNIVERSAL::require.
- Kicked Devel::Backtrace.
Modified: branches/upstream/liblog-handler-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblog-handler-perl/current/META.yml?rev=45479&op=diff
==============================================================================
--- branches/upstream/liblog-handler-perl/current/META.yml (original)
+++ branches/upstream/liblog-handler-perl/current/META.yml Thu Oct 8 13:59:59 2009
@@ -1,6 +1,6 @@
---
name: Log-Handler
-version: 0.57
+version: 0.58
author:
- Jonny Schulz
abstract: Log messages to several outputs.
@@ -28,7 +28,7 @@
provides:
Log::Handler:
file: lib/Log/Handler.pm
- version: 0.57
+ version: 0.58
Log::Handler::Config:
file: lib/Log/Handler/Config.pm
version: 0.05
Modified: branches/upstream/liblog-handler-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblog-handler-perl/current/README?rev=45479&op=diff
==============================================================================
--- branches/upstream/liblog-handler-perl/current/README (original)
+++ branches/upstream/liblog-handler-perl/current/README Thu Oct 8 13:59:59 2009
@@ -900,7 +900,6 @@
Carp
Data::Dumper
- Devel::Backtrace
Fcntl
Params::Validate
POSIX
Modified: branches/upstream/liblog-handler-perl/current/lib/Log/Handler.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblog-handler-perl/current/lib/Log/Handler.pm?rev=45479&op=diff
==============================================================================
--- branches/upstream/liblog-handler-perl/current/lib/Log/Handler.pm (original)
+++ branches/upstream/liblog-handler-perl/current/lib/Log/Handler.pm Thu Oct 8 13:59:59 2009
@@ -944,7 +944,6 @@
Carp
Data::Dumper
- Devel::Backtrace
Fcntl
Params::Validate
POSIX
@@ -1030,7 +1029,7 @@
use Log::Handler::Pattern;
use base qw(Log::Handler::Levels);
-our $VERSION = '0.57';
+our $VERSION = '0.58';
our $ERRSTR = '';
# $TRACE and $CALLER_LEVEL are both used as global
Modified: branches/upstream/liblog-handler-perl/current/lib/Log/Handler/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblog-handler-perl/current/lib/Log/Handler/Simple.pm?rev=45479&op=diff
==============================================================================
--- branches/upstream/liblog-handler-perl/current/lib/Log/Handler/Simple.pm (original)
+++ branches/upstream/liblog-handler-perl/current/lib/Log/Handler/Simple.pm Thu Oct 8 13:59:59 2009
@@ -1,6 +1,6 @@
=head1 NAME
-Log::Handler::Simple - A simple handler to log messages to a log file.
+Log::Handler::Simple - !!! THIS MODULE IS DEPRECATED !!!
=head1 SYNOPSIS
@@ -19,11 +19,9 @@
=head1 DESCRIPTION
-Maybe you are wondering why this module exists besides C<Log::Handler::Output::File>.
-
-This module is just for backward compatibilities to the old C<Log::Handler> - version 0.38.
-If you install the current version of C<Log::Handler> you don't need to rewrite your
-programs. You can use the old style if you wish.
+THIS MODULE IS DEPRECATED AND WILL BE KICKED AS SOON AS POSSIBLE!
+
+Please use Log::Handler::Output::File instead!
=head1 METHODS
@@ -627,7 +625,6 @@
Fcntl - for flock(), O_APPEND, O_WRONLY, O_EXCL and O_CREATE
POSIX - to generate the time stamp with strftime()
Params::Validate - to validate all options
- Devel::Backtrace - to backtrace caller()
Carp - to croak() on errors if die_on_errors is active
=head1 EXPORTS
@@ -686,7 +683,7 @@
package # hide from pause
Log::Handler::Simple;
-our $VERSION = '0.40';
+our $VERSION = '0.41';
use strict;
use warnings;
@@ -694,7 +691,6 @@
use POSIX qw(strftime);
use Params::Validate;
use Carp qw(croak);
-use Devel::Backtrace;
use constant EMERGENCY => 0;
use constant EMERG => 0;
@@ -1056,8 +1052,9 @@
}
sub _build_message {
- my $self = shift;
- my $level = shift;
+ my $self = shift;
+ my $level = shift;
+ my $skip = $self->{debug_skip};
my $message = '';
if ($self->{timeformat}) {
@@ -1071,17 +1068,23 @@
}
if ($self->{debug} || $level eq 'TRACE') {
$message .= "\n" if $message =~ /.\z|^\z/;
- my $bt = Devel::Backtrace->new($self->{debug_skip});
- my $pt = $bt->points - 1;
- for my $p (reverse 0..$pt) {
- $message .= ' ' x 3 . "CALL($p):";
- my $c = $bt->point($p);
- for my $k (qw/package filename line subroutine hasargs wantarray evaltext is_require/) {
- next unless defined $c->{$k};
- if ($self->{debug_mode} == 1) {
- $message .= " $k($c->{$k})";
- } elsif ($self->{debug_mode} == 2) {
- $message .= "\n" . ' ' x 6 . sprintf('%-12s', $k) . $c->{$k};
+
+ my @caller = ();
+ for (my $i=0; my @c = caller($i); $i++) {
+ my %frame;
+ @frame{qw/package filename line subroutine hasargs wantarray evaltext is_require/} = @c[0..7];
+ push @caller, \%frame;
+ }
+
+ foreach my $i (reverse $skip..$#caller) {
+ $message .= ' ' x 3 . "CALL($i):";
+ my $frame = $caller[$i];
+ foreach my $key (qw/package filename line subroutine hasargs wantarray evaltext is_require/) {
+ next unless defined $frame->{$key};
+ if ($self->{debug_mode} == 1) { # line mode
+ $message .= " $key($frame->{$key})";
+ } elsif ($self->{debug_mode} == 2) { # block mode
+ $message .= "\n" . ' ' x 6 . sprintf('%-12s', $key) . $frame->{$key};
}
}
$message .= "\n";
More information about the Pkg-perl-cvs-commits
mailing list