summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/Log
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Log')
-rw-r--r--Master/tlpkg/tlperl/lib/Log/Message.pm27
-rw-r--r--Master/tlpkg/tlperl/lib/Log/Message/Config.pm3
-rw-r--r--Master/tlpkg/tlperl/lib/Log/Message/Handlers.pm3
-rw-r--r--Master/tlpkg/tlperl/lib/Log/Message/Item.pm3
-rw-r--r--Master/tlpkg/tlperl/lib/Log/Message/Simple.pm33
5 files changed, 36 insertions, 33 deletions
diff --git a/Master/tlpkg/tlperl/lib/Log/Message.pm b/Master/tlpkg/tlperl/lib/Log/Message.pm
index 96ab34a2645..effcd133b9e 100644
--- a/Master/tlpkg/tlperl/lib/Log/Message.pm
+++ b/Master/tlpkg/tlperl/lib/Log/Message.pm
@@ -1,4 +1,5 @@
package Log::Message;
+use if $] > 5.017, 'deprecate';
use strict;
@@ -11,9 +12,7 @@ local $Params::Check::VERBOSE = 1;
BEGIN {
use vars qw[$VERSION @ISA $STACK $CONFIG];
-
- $VERSION = 0.04;
-
+ $VERSION = '0.06';
$STACK = [];
}
@@ -89,7 +88,7 @@ More on this below.
These are individual message items, which are objects that contain
the user message as well as the meta-data described above.
-See the L<Log::Message::Item> manpage to see how to extract this
+See the L<Log::Message::Item> manpage to see how to extract this
meta-data and how to work with the Item objects.
You should never need to create your own Item objects, but knowing
about their methods and accessors is important if you want to write
@@ -179,8 +178,8 @@ provided.
=item verbose
Log::Message makes use of another module to validate its arguments,
-which is called L<Params::Check>, which is a lightweight, yet
-powerful input checker and parser. (See the L<Params::Check>
+which is called L<Params::Check>, which is a lightweight, yet
+powerful input checker and parser. (See the L<Params::Check>
manpage for details).
The verbose setting will control whether this module will
@@ -314,7 +313,7 @@ sub _new_stack {
};
my $args = check( $tmpl, \%hash, $CONFIG->verbose ) or (
- warn(loc(q[Could not create a new stack object: %1],
+ warn(loc(q[Could not create a new stack object: %1],
Params::Check->last_error)
),
return
@@ -399,9 +398,9 @@ sub store {
%hash = @_;
}
- my $args = check( $tmpl, \%hash ) or (
- warn( loc(q[Could not store error: %1], Params::Check->last_error) ),
- return
+ my $args = check( $tmpl, \%hash ) or (
+ warn( loc(q[Could not store error: %1], Params::Check->last_error) ),
+ return
);
my $extra = delete $args->{extra};
@@ -488,10 +487,10 @@ sub retrieve {
}
my $args = check( $tmpl, \%hash ) or (
- warn( loc(q[Could not parse input: %1], Params::Check->last_error) ),
- return
+ warn( loc(q[Could not parse input: %1], Params::Check->last_error) ),
+ return
);
-
+
my @list =
grep { $_->tag =~ /$args->{tag}/ ? 1 : 0 }
grep { $_->level =~ /$args->{level}/ ? 1 : 0 }
@@ -561,7 +560,7 @@ This removes all items from the stack and returns them to the caller
sub flush {
my $self = shift;
-
+
return splice @{$self->{STACK}};
}
diff --git a/Master/tlpkg/tlperl/lib/Log/Message/Config.pm b/Master/tlpkg/tlperl/lib/Log/Message/Config.pm
index fff771bbb8a..e326e40c94c 100644
--- a/Master/tlpkg/tlperl/lib/Log/Message/Config.pm
+++ b/Master/tlpkg/tlperl/lib/Log/Message/Config.pm
@@ -1,4 +1,5 @@
package Log::Message::Config;
+use if $] > 5.017, 'deprecate';
use strict;
use Params::Check qw[check];
@@ -8,7 +9,7 @@ use Locale::Maketext::Simple Style => 'gettext';
BEGIN {
use vars qw[$VERSION $AUTOLOAD];
- $VERSION = 0.04;
+ $VERSION = '0.06';
}
sub new {
diff --git a/Master/tlpkg/tlperl/lib/Log/Message/Handlers.pm b/Master/tlpkg/tlperl/lib/Log/Message/Handlers.pm
index 366c03ad018..956b0661be5 100644
--- a/Master/tlpkg/tlperl/lib/Log/Message/Handlers.pm
+++ b/Master/tlpkg/tlperl/lib/Log/Message/Handlers.pm
@@ -1,8 +1,9 @@
package Log::Message::Handlers;
+use if $] > 5.017, 'deprecate';
use strict;
use vars qw[$VERSION];
-$VERSION = '0.04';
+$VERSION = '0.06';
=pod
diff --git a/Master/tlpkg/tlperl/lib/Log/Message/Item.pm b/Master/tlpkg/tlperl/lib/Log/Message/Item.pm
index 918a366e8c6..13e1e459cc3 100644
--- a/Master/tlpkg/tlperl/lib/Log/Message/Item.pm
+++ b/Master/tlpkg/tlperl/lib/Log/Message/Item.pm
@@ -1,4 +1,5 @@
package Log::Message::Item;
+use if $] > 5.017, 'deprecate';
use strict;
use vars qw[$VERSION];
@@ -11,7 +12,7 @@ use Carp ();
BEGIN {
use vars qw[$AUTOLOAD $VERSION];
- $VERSION = '0.04';
+ $VERSION = '0.06';
}
### create a new item.
diff --git a/Master/tlpkg/tlperl/lib/Log/Message/Simple.pm b/Master/tlpkg/tlperl/lib/Log/Message/Simple.pm
index efceae5b676..f9db4ffc1aa 100644
--- a/Master/tlpkg/tlperl/lib/Log/Message/Simple.pm
+++ b/Master/tlpkg/tlperl/lib/Log/Message/Simple.pm
@@ -1,13 +1,14 @@
package Log::Message::Simple;
+use if $] > 5.017, 'deprecate';
use strict;
use Log::Message private => 0;;
-BEGIN {
- use vars qw[$VERSION];
- $VERSION = 0.08;
+BEGIN {
+ use vars qw[$VERSION];
+ $VERSION = '0.10';
}
-
+
=pod
@@ -45,7 +46,7 @@ Log::Message::Simple - Simplified interface to Log::Message
local $Log::Message::Simple::MSG_FH = \*STDERR;
local $Log::Message::Simple::ERROR_FH = \*STDERR;
local $Log::Message::Simple::DEBUG_FH = \*STDERR;
-
+
### force a stacktrace on error
local $Log::Message::Simple::STACKTRACE_ON_ERROR = 1
@@ -68,7 +69,7 @@ Exported by default, or using the C<:STD> tag.
=head2 debug("message string" [,VERBOSE])
Records a debug message on the stack, and prints it to C<STDOUT> (or
-actually C<$DEBUG_FH>, see the C<GLOBAL VARIABLES> section below),
+actually C<$DEBUG_FH>, see the C<GLOBAL VARIABLES> section below),
if the C<VERBOSE> option is true.
The C<VERBOSE> option defaults to false.
@@ -83,10 +84,10 @@ The C<VERBOSE> options defaults to true.
Exported by default, or using the C<:STD> tag.
-=cut
+=cut
{ package Log::Message::Handlers;
-
+
sub msg {
my $self = shift;
my $verbose = shift || 0;
@@ -127,8 +128,8 @@ Exported by default, or using the C<:STD> tag.
my $msg = '['. $self->tag . '] ' . $self->message;
- print $Log::Message::Simple::STACKTRACE_ON_ERROR
- ? Carp::shortmess($msg)
+ print $Log::Message::Simple::STACKTRACE_ON_ERROR
+ ? Carp::shortmess($msg)
: $msg . "\n";
select $old_fh;
@@ -197,23 +198,23 @@ BEGIN {
@ISA = 'Exporter';
@EXPORT = qw[error msg debug];
@EXPORT_OK = qw[carp cluck croak confess];
-
+
%EXPORT_TAGS = (
STD => \@EXPORT,
CARP => \@EXPORT_OK,
ALL => [ @EXPORT, @EXPORT_OK ],
- );
+ );
my $log = new Log::Message;
for my $func ( @EXPORT, @EXPORT_OK ) {
no strict 'refs';
-
+
### up the carplevel for the carp emulation
### functions
*$func = sub { local $Carp::CarpLevel += 2
if grep { $_ eq $func } @EXPORT_OK;
-
+
my $msg = shift;
$log->store(
message => $msg,
@@ -265,7 +266,7 @@ printed. This default to C<*STDOUT>.
=item $STACKTRACE_ON_ERROR
-If this option is set to C<true>, every call to C<error()> will
+If this option is set to C<true>, every call to C<error()> will
generate a stacktrace using C<Carp::shortmess()>.
Defaults to C<false>
@@ -280,7 +281,7 @@ BEGIN {
$ERROR_FH = \*STDERR;
$MSG_FH = \*STDOUT;
$DEBUG_FH = \*STDOUT;
-
+
$STACKTRACE_ON_ERROR = 0;
}