distribution Log-Report-0.996.tar.gz
Mark Overmeer authored 10 years ago
Mark Overmeer committed 6 years ago
3 | 3 |
TODO:
|
4 | 4 |
. connect to Message::Passing framework
|
5 | 5 |
. extract a Log::Report::Optional distribution
|
|
6 |
|
|
7 |
version 0.996: Wed Sep 4 17:23:11 CEST 2013
|
|
8 |
Fixes:
|
|
9 |
- you could not share one ::Translator::POT over two domains.
|
|
10 |
discovered by [Richard Still]
|
|
11 |
- third attempt to fix errors in t/53log4perl.t on Windows
|
|
12 |
[cpantesters]
|
|
13 |
- remove double reporting of errors which exceptions are caught
|
|
14 |
with eval(). But better use try().
|
6 | 15 |
|
7 | 16 |
version 0.995: Thu Aug 29 09:19:13 CEST 2013
|
8 | 17 |
Fixes:
|
1 | 1 |
|
2 | 2 |
use 5.008;
|
3 | 3 |
|
4 | |
my $version = '0.995';
|
|
4 |
my $version = '0.996';
|
5 | 5 |
|
6 | 6 |
my %prereq =
|
7 | 7 |
( Test::More => 0.86
|
335 | 335 |
my $loc = defined $locale ? setlocale(LC_ALL, $locale) : undef;
|
336 | 336 |
|
337 | 337 |
if($self->{_expand})
|
338 | |
{ my $re = join '|', map { quotemeta $_ } keys %$self;
|
|
338 |
{ my $re = join '|', map quotemeta, keys %$self;
|
339 | 339 |
$text =~ s/\{($re)(\%[^}]*)?\}/$self->_expand($1,$2)/ge;
|
340 | 340 |
}
|
341 | 341 |
|
57 | 57 |
or return $self->SUPER::translate($msg, $lang);
|
58 | 58 |
|
59 | 59 |
my $pot
|
60 | |
= exists $self->{pots}{$locale}
|
61 | |
? $self->{pots}{$locale}
|
|
60 |
= exists $self->{pots}{$domain}{$locale}
|
|
61 |
? $self->{pots}{$domain}{$locale}
|
62 | 62 |
: $self->load($domain, $locale);
|
63 | 63 |
|
64 | 64 |
defined $pot
|
|
93 | 93 |
|
94 | 94 |
eval "require $class" or panic $@;
|
95 | 95 |
|
96 | |
return $self->{pots}{$locale}
|
|
96 |
return $self->{pots}{$domain}{$locale}
|
97 | 97 |
= $class->read($fn, charset => $self->charset);
|
98 | 98 |
}
|
99 | 99 |
|
100 | |
$self->{pots}{$locale} = undef;
|
|
100 |
$self->{pots}{$domain}{$locale} = undef;
|
101 | 101 |
}
|
102 | 102 |
|
103 | 103 |
1;
|
50 | 50 |
$log_line = <$out>;
|
51 | 51 |
$log_line =~ s!\\!/!g; # windows
|
52 | 52 |
$expected_msg = "$line_number> notice: this is a test";
|
53 | |
like($log_line, qr!^$date_qr t[/\\]53log4perl\.t \Q$expected_msg\E$!);
|
|
53 |
# do not anchor at the end: $ does not match on Windows
|
|
54 |
like($log_line, qr!^$date_qr t[/\\]53log4perl\.t \Q$expected_msg\E!);
|
54 | 55 |
|
55 | 56 |
warning "some more"; $line_number = __LINE__;
|
56 | 57 |
my $s2 = -s $outfn;
|
|
58 | 59 |
$log_line = do { <$out> };
|
59 | 60 |
$log_line =~ s!\\!/!g; # windows
|
60 | 61 |
$expected_msg = "$line_number> warning: some more";
|
61 | |
like($log_line, qr!^$date_qr t[/\\]53log4perl\.t \Q$expected_msg\E$!);
|
|
62 |
like($log_line, qr!^$date_qr t[/\\]53log4perl\.t \Q$expected_msg\E!);
|
62 | 63 |
|
63 | 64 |
unlink $outfn;
|
64 | 65 |
|