Codebase list liblog-report-perl / v0.996
distribution Log-Report-0.996.tar.gz Mark Overmeer authored 10 years ago Mark Overmeer committed 6 years ago
6 changed file(s) with 19 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
33 TODO:
44 . connect to Message::Passing framework
55 . 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().
615
716 version 0.995: Thu Aug 29 09:19:13 CEST 2013
817 Fixes:
11
22 use 5.008;
33
4 my $version = '0.995';
4 my $version = '0.996';
55
66 my %prereq =
77 ( Test::More => 0.86
335335 my $loc = defined $locale ? setlocale(LC_ALL, $locale) : undef;
336336
337337 if($self->{_expand})
338 { my $re = join '|', map { quotemeta $_ } keys %$self;
338 { my $re = join '|', map quotemeta, keys %$self;
339339 $text =~ s/\{($re)(\%[^}]*)?\}/$self->_expand($1,$2)/ge;
340340 }
341341
5757 or return $self->SUPER::translate($msg, $lang);
5858
5959 my $pot
60 = exists $self->{pots}{$locale}
61 ? $self->{pots}{$locale}
60 = exists $self->{pots}{$domain}{$locale}
61 ? $self->{pots}{$domain}{$locale}
6262 : $self->load($domain, $locale);
6363
6464 defined $pot
9393
9494 eval "require $class" or panic $@;
9595
96 return $self->{pots}{$locale}
96 return $self->{pots}{$domain}{$locale}
9797 = $class->read($fn, charset => $self->charset);
9898 }
9999
100 $self->{pots}{$locale} = undef;
100 $self->{pots}{$domain}{$locale} = undef;
101101 }
102102
103103 1;
294294 }
295295 }
296296
297 if(@last_call)
297 if(@last_call && !$^S)
298298 { # the PERL dispatcher may terminate the program
299299 shift(@last_call)->log(@last_call);
300300 }
5050 $log_line = <$out>;
5151 $log_line =~ s!\\!/!g; # windows
5252 $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!);
5455
5556 warning "some more"; $line_number = __LINE__;
5657 my $s2 = -s $outfn;
5859 $log_line = do { <$out> };
5960 $log_line =~ s!\\!/!g; # windows
6061 $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!);
6263
6364 unlink $outfn;
6465